相关疑难解决方法(0)

当在Maven Cucumber Reports中构建失败时,不会生成报告

生成成功后,报告将成功生成,但是如果有任何失败的情况导致生成失败,则不会生成报告。

checkBuildResult已设置为false

pom文件插件

     <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>
Run Code Online (Sandbox Code Playgroud)

跑步班如下

  @RunWith(Cucumber.class)
    @CucumberOptions(
            features = {"classpath:features"},
            plugin = {"pretty","json:target/cucumber.json"},
            tags = {"@currentTest"},
            glue={"helpers","stepDefinitions"},
            monochrome = true
            )
    public class RunCukesTest{

    }
Run Code Online (Sandbox Code Playgroud)

selenium cucumber maven cucumber-jvm selenium-webdriver

2
推荐指数
1
解决办法
4890
查看次数