Question

I work on a maven project that needs to be jdk1.4 compliant. Our testng classes use the pseudo-javadoc comments to define tests.

/**
 * @testng.test
 */

In Netbeans, the right-click menu works fine to run tests. In Eclipse, my collegues tell me it does not work and the test class is not found. So I've been trying to add a main() to the test classes, using something along the lines of

TestNG testng = new TestNG();
testng.setTestClasses( new Class[]{MyTestClass.class} );
testng.run();

But when I do, I get the following result:

Command line suite
Total tests run: 0, Failures: 0, Skips: 0

So, basically, tests are not found, which does not surprise me, as something needs to parse the javadoc and I don't see how it could happen here. Has anyone had a similar problem? How did you get around it so that individual classes can be tested easily in Eclipse?

Was it helpful?

Solution

TestNG stopped supporting JDK 1.4 a while ago.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top