Package io.karatelabs.output
Class JunitXmlReportListener
java.lang.Object
io.karatelabs.output.JunitXmlReportListener
- All Implemented Interfaces:
ResultListener
A
ResultListener that generates JUnit XML reports asynchronously.
This listener writes per-feature JUnit XML files as features complete using
a single-thread executor. Each feature produces a separate XML file named
{packageQualifiedName}.xml. This approach:
- Does not block test execution during report generation
- 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.voidonSuiteEnd(SuiteResult result) Called when the suite 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
-
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
-
onSuiteEnd
Description copied from interface:ResultListenerCalled when the suite completes execution.- Specified by:
onSuiteEndin interfaceResultListener- Parameters:
result- the final suite result
-