Package io.karatelabs.output
Interface ResultListener
- All Known Implementing Classes:
CucumberJsonReportListener,HtmlReportListener,JunitXmlReportListener
public interface ResultListener
Interface for receiving test execution results as they stream in.
Unlike RunListener, ResultListener is purely observational
and cannot abort execution. Use this for reporting and external integrations.
The scenario is the smallest unit of granularity - step-level events are not streamed as they add overhead without significant reporting value.
Example usage:
Runner.path("features/")
.resultListener(new HtmlReportListener())
.parallel(10);
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidonFeatureEnd(FeatureResult result) Called when a feature completes execution.default voidonFeatureStart(Feature feature) Called when a feature starts execution.default voidonScenarioEnd(ScenarioResult result) Called when a scenario completes execution.default voidonScenarioStart(Scenario scenario) Called when a scenario starts execution.default voidonSuiteEnd(SuiteResult result) Called when the suite completes execution.default voidonSuiteStart(Suite suite) Called when the suite starts execution.
-
Method Details
-
onSuiteStart
Called when the suite starts execution.- Parameters:
suite- the suite about to run
-
onSuiteEnd
Called when the suite completes execution.- Parameters:
result- the final suite result
-
onFeatureStart
Called when a feature starts execution.- Parameters:
feature- the feature about to run
-
onFeatureEnd
Called when a feature completes execution.- Parameters:
result- the feature result
-
onScenarioStart
Called when a scenario starts execution.- Parameters:
scenario- the scenario about to run
-
onScenarioEnd
Called when a scenario completes execution. This is the finest granularity - step events are not streamed.- Parameters:
result- the scenario result
-