On-the-fly reporting of the JUnit TestSuite results

Hi,

I have a maven build configuration in TeamCity that runs one JUnit TestSuite with a big number of tests in it. The problem is that it takes about an hour to run them all and I only get results after all tests are finished.

Is there a way to report individual test results before the whole TestSuite is finished?

As far as I understand, there are two options:
1. Service messages. Can't think of a way to send a service message from the JUnit test, as Surefire plugin redirects all output to the file.

2. XML Test reporting plugin. Documentation says

When possible, parsing of partly written files is supported, so the reporting is started as soon as first data is avaialble and more data is reported as it is written to the report files


      What conditions should be met to make the parsing of partly written files possible? Which format will you suggest?


Is there a better way to do this ?
4 comments

If your build can produce JUnit XML report you can try to use XML test reporting plugin. At least I would start with this option.
On the fly reporting will be enabled automatically, once you specify which folders to watch for xml report files.

0

How can I suppress parsing of the standard maven surefire report? Without suppressing I see two sets of results: one from surefire, another - from my custom XML report.

0

Right now this can't be disabled, please submit feature request in our tracker: http://youtrack.jetbrains.net/. As a workaround you can start Maven from the command line runner.

0

Actually, adding <printSummary>false</printSummary> configuration parameter to maven-surefire-plugin disables processing of surefire output.

0

Please sign in to leave a comment.