TestNG

Maven 2.0.6 and unit tests

Tagged:  •    •    •  

Maven 2.0.6 is out and it seems it fixes some problems. One really annoying issue with at least the last release 2.0.5 was, that maven tends to ignore some test in projects which subprojects contains both JUnit and TestNG test. I wrote about that problem and a solution if you are in the affected project, but the problem re-appears if you are building not from within the same directory level, e.g. one level up in the parent project. This seems to be fixed now...

No, it isn't. Does anybody know how to get all test run in a mixed unit test framework project?

Maven and TestNG

Tagged:  •    •    •    •    •  

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.

Syndicate content