Package io.karatelabs.output
Class HtmlReportListener
java.lang.Object
io.karatelabs.output.HtmlReportListener
- All Implemented Interfaces:
ResultListener
A
ResultListener that generates HTML reports.
This listener writes each feature's HTML file as that feature completes, then generates summary pages at suite end. This approach:
- Keeps only small summary data in memory
- Makes partial results available as tests complete
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionHtmlReportListener(Path outputDir, String env) Create a new HTML 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
-
HtmlReportListener
Create a new HTML report listener.- Parameters:
outputDir- the directory to write reportsenv- the karate environment (may be null)
-
-
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
-