Reports are generating successfully when the build is successful but when there are any failed cases which cause build failure, reports are not generated.
checkBuildResult is already set to false
pom file plugin
<plugin>
<groupId>net.masterthought</groupId>
<artifactId>maven-cucumber-reporting</artifactId>
<version>3.13.0</version>
<executions>
<execution>
<id>execution</id>
<phase>verify</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<projectName>Simplify360 Automation Test Report</projectName>
<outputDirectory>${project.build.directory}/site/cucumber-reports</outputDirectory>
<cucumberOutput>${project.build.directory}/cucumber.json</cucumberOutput>
<!-- <jsonFiles>
<param>${project.build.directory}/cucumber.json</param>
</jsonFiles> -->
<!-- <parallelTesting>false</parallelTesting> -->
<buildNumber>8.4.1.2</buildNumber>
<checkBuildResult>false</checkBuildResult>
</configuration>
</execution>
</executions>
</plugin>
And the runner class is as below,
@RunWith(Cucumber.class)
@CucumberOptions(
features = {"classpath:features"},
plugin = {"pretty","json:target/cucumber.json"},
tags = {"@currentTest"},
glue={"helpers","stepDefinitions"},
monochrome = true
)
public class RunCukesTest{
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…