Bela Ban created JGRP-1423:
------------------------------
Summary: TestNG reporting enhancements
Key: JGRP-1423
URL:
https://issues.jboss.org/browse/JGRP-1423
Project: JGroups
Issue Type: Enhancement
Reporter: Bela Ban
Assignee: Bela Ban
Fix For: 3.1
JUnitXMLReporter doesn't includes all the tests:
- When a test has an invocationCount, the code to determine the number of methods to run
after which to generate the report, counts this method only *once*. Example: when we have
methods foo(), bar() and @Test(invocationCount=5) foobar(), the count method returns 3,
whereas the real number of tests run is 7. This means the report is generated after 3
methods run (callback: onTestSuccess()); we're *not* reporting 4 methods !
- When we have a @DataProvider on a method foo(), the count method only counts it once,
although the data provider may return more than 1 result. Same as above: we won't
include all of the run methods in the report
SOLUTION:
- We don't generate the report in onTestSuccess(), but simply add every test method
that's completed to a file (tests.data), in a directory named after the test class
- We also created stdout.txt and stderr.txt in the same directory
- At the end of the test (onFinish()), we iterate through all dirs and generate
TEST-org.jgroups.XXX-suffix.xml files, which can then be used by the junitreporter ANT
task to generate HTML.
- There's also a new class CountTests which can be used to dump all the methods of all
classes which will be run under TestNG
- Another new class (DumpData) can be used to write the contents of tests.data to stdout
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira