I am trying to run both JUnit 4.4 and TestNG 5.8 tests in the same suite. I seem to have come accross this problem in surefire 2.4.3 where as soon as I add testNG as a dependency, the TestNG runner is used. The problem is that this runner cannot handle JUnit 4.4 tests: I get:
Failure in JUnit mode for class com.sampleTest: could not create/run JUnit test suite:
cannot retrieve JUnit method
Which is resolved if I extend TestCase in com.sampleTest as in JUnit 3.x
A sample of the pom.xml I use is:
Note, at present I would be happy to run all JUnit 4.4 tests in one execution and then use a profile to run all TestNG tests.
Please can you tell me whether you know of a work around for this?