Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.4
-
Fix Version/s: 2.4
-
Component/s: TestNG support
-
Labels:None
-
Complexity:Intermediate
-
Testcase included:yes
Description
The attached Maven project has two tests: one JUnit test and one TestNG test. According to the documentation, in this case TestNG should run both tests.
Run "mvn test". Only the TestNG test will run. If you modify the pom to set the property "junit=true", only the JUnit test will run.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.4-SNAPSHOT</version>
<configuration>
<properties>
<property>
<name>junit</name>
<value>true</value>
</property>
</properties>
</plugin>
Issue Links
- is duplicated by
-
SUREFIRE-532
JUnit and TestNG clash with each other
-
-
SUREFIRE-579
Maven Surefire Plugin don't run JUnit tests if TestNG in dependencies
-
IMO, this problem is probably too hard to be worth solving. See the mailing list archive thread here:
http://mail-archives.apache.org/mod_mbox/maven-surefire-dev/200711.mbox/%3cPine.WNT.4.64.0711191635230.2484@sfeng02.rf.lan%3e
http://tinyurl.com/32745g
Alex suggested a good way to tell the different between JUnit and TestNG runs, but trying to dynamically construct multiple test runs from two arrays of classes that don't clobber each other when you go to run them is harder than it has any right to be.