surefire

The Workable Configuration for TestNG, Maven 2, SureFire, and Ecplise

Submitted by kai on Wed, 2007-05-02 22:19. ::

I started to use TestNG for testing in Java today. and it took me a while to find out that the workable Configuration for TestNG, Maven 2's Surefire, is:

  • TestNG 5.1,
  • Surefire 2.3

The real important thing is to specify <classifier>jdk15</classifier> for JDK 1.5+, or <classifier>jdk14</classifier> for JDK 1.4 in your pom file. The reference can be found here

If you don't specify the classifier, it seems to run in jdk14 mode. so all of my tests using annotations didn't run with Maven.

XML feed