JUnitReportReporter should capture the test case output at the test case level #2875
Closed
2 of 7 tasks
Labels
Milestone
TestNG Version
7.8.0
Expected behavior
The junitreports/*.xml report adds the org.testng.Reporter's test case output at the test suite level instead of the test case level. This creates ambiguity for tools which use the xml files, particularly when using the Jenkins Junit plugin which only saves the first
system-out
tag seen in its result. The Junit UI then renders the Standard Output for each test case with the same suite-level value. However, the Junit plugin allows for tools to "report stdout and stderr at testcase level":The desired JUnitReportReporter output would be (some elements/attributes omitted for conciseness, some new lines added only for example clarity):
Actual behavior
Current JUnitReportReporter output is generated with
system-out
following eachtestcase
:Aligning with XMLReporter
An initial task to add the Reporter output to the Junit report, #2124, mentions similarity with XMLReporter's testng-results.xml. However XMLReporters approach is to:
A sample of the current XMLReporter's testng-results.xml (with some elements/attributes omitted for conciseness) to demonstrate how the new output would be aligned:
Junit Plugin Expected behavior
With the JUnitReportReporter update the Junit retains the
stdout
with thecase
:Junit Plugin Actual behavior
When Junit reads the current file, only one JUnitReportReporter
testsuite/system-out
tag is preserved asstdout
in junitResult.xml:Is the issue reproducible on runner?
Test case sample
Contribution guidelines
Incase you plan to raise a pull request to fix this issue, please make sure you refer our Contributing section for detailed set of steps.
The text was updated successfully, but these errors were encountered: