https://bz.apache.org/bugzilla/show_bug.cgi?id=63827
Bug ID: 63827
Summary: LegacyXmlResultFormatter of JUnitLauncher Task does
not write StackTrace of failure
Product: Ant
Version: 1.10.7
Hardware: PC
Status: NEW
Severity: major
Priority: P2
Component: Optional Tasks
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Switching from JUnit 4 to JUnit 5 we detected that LegacyXmlResultFormatter
does not write the StackTrace of a failure into the xml. Only the message is
stored.
Which makes troubleshooting very hard on failed tests.
Please see JUnit 5 code here:
https://github.com/apache/ant/blob/26b8a01e6421d22a2ca4393ab1420444b07a0bfd/src/main/org/apache/tools/ant/taskdefs/optional/junitlauncher/LegacyXmlResultFormatter.java#L279
This is how the JUnit 4 code does it:
https://github.com/apache/ant/blob/3a4980e3c4be56745964442abc01360b618e3a85/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLJUnitResultFormatter.java#L316
final String strace = JUnitTestRunner.getFilteredTrace(t);
final Text trace = doc.createTextNode(strace);
nested.appendChild(trace);
These tree lines are missing in LegacyXmlResultFormatter for JUnit5.
I can add a patch for this if desired!?
--
You are receiving this mail because:
You are the assignee for the bug.