25 Jan

Running specific JUnit tests within a test class using Ant

The test class, FooTests.java.

Compile.

Verify the tests run. Replace the colons with semi-colons in windows.

The Ant build file, build.xml.

Run all tests.

Run only the second test by specifying the “test-methods” Ant property on the command line.

Run only the second and third tests.

Leave a Reply

Your email address will not be published. Required fields are marked *