Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.19
-
None
Description
When running two test classes, one using JUnit and the other testng annotations, I observe surefire-testng running both tests:
$ cat src/test/java/JunitTest.java import org.junit.Test; public final class JunitTest { @Test public void junitMethod() throws Exception {} } $ cat src/test/java/TestngTest.java import org.testng.annotations.Test; public final class TestngTest { @Test public void testngMethod() throws Exception {} } $ mvn clean test --quiet ------------------------------------------------------- T E S T S ------------------------------------------------------- Running JunitTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec - in JunitTest Results : Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 ------------------------------------------------------- T E S T S ------------------------------------------------------- Running TestSuite Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.476 sec - in TestSuite Results : Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
Instead it should only run the single testng test.