You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Dan Fabulich (JIRA)" <ji...@codehaus.org> on 2007/11/20 23:49:57 UTC

[jira] Closed: (SUREFIRE-169) No tests detected when both TestNG and JUnit in classpath

     [ http://jira.codehaus.org/browse/SUREFIRE-169?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dan Fabulich closed SUREFIRE-169.
---------------------------------

    Resolution: Duplicate

It's by design that if TestNG and JUnit are both on the classpath, we want to run everything with TestNG.  TestNG can run JUnit tests, so that's *supposed* to "just work" ... you should never notice the difference.

Unfortunately, due to SUREFIRE-377 in 2.4 trunk, TestNG doesn't correctly detect JUnit tests.  You can add a surefire configuration to make TestNG detect/run JUnit tests correctly (though it can't do both TestNG tests and JUnit tests at once).

So this is partly by design and partly another bug.

> No tests detected when both TestNG and JUnit in classpath
> ---------------------------------------------------------
>
>                 Key: SUREFIRE-169
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-169
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: classloading, JUnit 3.x support, TestNG support
>    Affects Versions: 2.0 (2.2 plugin)
>         Environment: Linux, JDK1.5
>            Reporter: Jim Crossley
>             Fix For: 2.4
>
>
> I have a multi-module project where testng is declared as a dep in the parent and a subproject declares junit as a dep.  When I invoke 'mvn test' in the subproject, surefire doesn't detect any tests to run.  If I simply remove the testng dep from the parent, the tests run fine.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira