After automated regression test suite execution, troubleshooting failures is an important post execution task. However, it needs more error details to make sure whether the failure is test data issue or script issue or an actual application bug. Default Cucumber reporting does not provide step definition information. If you want to add the failed step definition information in Cucumber HTML Report, you can use Scott Test Reporter.
How to install? Add the below plugin and dependency in POM.xml
<build> <plugins> <plugin> <groupId>hu.advancedweb<groupId> <artifactId>scott-maven-plugin<artifactId> <version>3.5.0<version> <executions> <execution> <goals> <goal>prepare-agent<goal> <goals> <execution> <executions> <plugin> <plugins> <build> <dependency> <groupId>hu.advancedweb<groupId> <artifactId>scott<artifactId> <version>3.5.0<version> <scope>test<scope> <dependency>
Cukes Test
package cukes; import cucumber.api.CucumberOptions; import cucumber.api.testng.AbstractTestNGCucumberTests; @CucumberOptions(features = "src/test/resources/Sample.feature", monochrome = true, plugin = { "pretty", "hu.advancedweb.scott.runtime.ScottCucumberHTMLFormatter:target/cucumber", "hu.advancedweb.scott.runtime.ScottCucumberJSONFormatter:target/cucumber.json"}, glue = {"step_definitions"}) public class Runner1 extends AbstractTestNGCucumberTests { }
Report
In Conclusion:
Using this library, you can troubleshoot failures without revisiting or executing your code again. To provide quick feedback after test automation execution, you need to troubleshoot the failures quickly.
Comments(0)