I am trying to use ant to run junit tests and generate reports. I am able to successfully run the tests but the report files are empty.
What am I doing wrong ?
The ant JUnit Task doc gives this example that might help you (as it apparently does exactly what you're trying to achieve):
Runs my.test.TestCase in the same VM, ignoring the given CLASSPATH; only a warning is printed if this test fails. In addition to the plain text test results, for this test a XML result will be output to result.xml. Then, for each matching file in the directory defined for ${src.tests} a test is run in a separate VM. If a test fails, the build process is aborted. Results are collected in files named TEST-name.txt and written to ${reports.tests}.
It is specified in the doc that printsummary
can take values on
and off
, but they're using yes
in the example which is on the same page, so I guess it's accepted too.