Package io.karatelabs.output
Class JunitXmlReportListener
java.lang.Object
io.karatelabs.output.JunitXmlReportListener
- All Implemented Interfaces:
ResultListener
A
ResultListener that generates JUnit XML reports.
This listener writes each feature's JUnit XML file as that feature completes.
Each feature produces a separate XML file named
{packageQualifiedName}.xml. This approach:
- Makes partial results available as tests complete
- Compatible with CI systems (Jenkins, GitHub Actions, etc.)
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJunitXmlReportListener(Path outputDir) Create a new JUnit XML report listener. -
Method Summary
Modifier and TypeMethodDescriptionvoidonFeatureEnd(FeatureResult result) Called when a feature completes execution.voidonSuiteStart(Suite suite) Called when the suite starts execution.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.karatelabs.output.ResultListener
onFeatureStart, onScenarioEnd, onScenarioStart, onSuiteEnd
-
Field Details
-
SUBFOLDER
- See Also:
-
-
Constructor Details
-
JunitXmlReportListener
Create a new JUnit XML report listener.- Parameters:
outputDir- the base output directory (subfolder will be created)
-
-
Method Details
-
onSuiteStart
Description copied from interface:ResultListenerCalled when the suite starts execution.- Specified by:
onSuiteStartin interfaceResultListener- Parameters:
suite- the suite about to run
-
onFeatureEnd
Description copied from interface:ResultListenerCalled when a feature completes execution.- Specified by:
onFeatureEndin interfaceResultListener- Parameters:
result- the feature result
-