A while ago we switched for a couple of projects from JUnit to TestNG. Everything went fine with maven and Eclipse, but yesterday I recognized while running maven clean test that the tests where found but not executed. I got many lines like these:
Running de.ibacg.XXX.dao.jpa.test.UserDaoAndRoleDaoTest
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.445 sec
Running de.ibacg.XXX.dao.jpa.test.StatusProtocolEntryDaoTest
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.007 sec
Running de.ibacg.XXX.services.provider.test.MasterDaoProviderTest
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.688 sec
...
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
Very strange, as all these tests contain at least two test methods and are annotated with @Test on method- or class-level.
Some googling later, I found that this is a known issue with maven-surefire-plugin before version 2.3. So if you have the same issues, use a newer version of this maven plugin, at least version 2.3. But now the question is: Why decided maven to use an older version of maven-surefire-plugin? The dependencies didn't changed in the last days.
Post new comment