Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Maven Cucumber rhtml eport在selenium Cucumber中未以有效格式生成_Maven_Selenium Webdriver_Cucumber - Fatal编程技术网

Maven Cucumber rhtml eport在selenium Cucumber中未以有效格式生成

Maven Cucumber rhtml eport在selenium Cucumber中未以有效格式生成,maven,selenium-webdriver,cucumber,Maven,Selenium Webdriver,Cucumber,我正试图在maven cucumber html report中以html格式生成报告。我能够生成cucumber json和cucumber pretty html报告,但问题是生成的报告不是html格式,并且没有任何数据。有人能帮我解决这个问题吗 Maven pom依赖项和插件 生成的报告文件格式 我在这里找到了答案 并像这里一样更新pom插件,而不是依赖项 希望对其他人有所帮助。我在这里找到了答案 并像这里一样更新pom插件,而不是依赖项 希望对其他人有所帮助。我不确定这是否有帮助

我正试图在maven cucumber html report中以html格式生成报告。我能够生成cucumber json和cucumber pretty html报告,但问题是生成的报告不是html格式,并且没有任何数据。有人能帮我解决这个问题吗

Maven pom依赖项和插件 生成的报告文件格式
我在这里找到了答案

并像这里一样更新pom插件,而不是依赖项


希望对其他人有所帮助。

我在这里找到了答案

并像这里一样更新pom插件,而不是依赖项


希望对其他人有所帮助。

我不确定这是否有帮助,但所有的文档都显示了插件的导出,如:
{“pretty”,“json:target/cumber.json”,“html:target/site/cumber pretty”}
如果您将runner类更改为:
@cumberOptions(features=“testFeature”,glue={“stepDefinitions”},plugin={“pretty”,“json:target/cucumber.json”,“html:target/site/cumber pretty”},monology=true)公共类TestRunnerTestNG扩展AbstractTestNGCucumberTests{
当然,我会检查我现在是否尝试过,但结果相同不确定这是否有帮助,但所有文档都显示了插件的导出,如下所示:
{“pretty”,“json:target/cumber.json”html:target/site/cucumber pretty“}
如果您将runner类更改为:
@CucumberOptions(features=“testFeature”,glue={“stepDefinitions”},plugin={“pretty”,“json:target/cumber.json”,“html:target/site/cumber pretty”},monology=true)公共类TestRunnerTestNG扩展了AbstractTestngCumberTest{
当然,我会检查我现在是否尝试过,但结果相同
<dependency>
    <groupId>com.aventstack</groupId>
    <artifactId>extentreports</artifactId>
    <version>4.1.5</version>
</dependency>

<!-- https://mvnrepository.com/artifact/net.masterthought/cucumber-reporting -->
<dependency>
    <groupId>net.masterthought</groupId>
    <artifactId>cucumber-reporting</artifactId>
    <version>5.3.0</version>
</dependency>

 <plugin>
                    <groupId>net.masterthought</groupId>
                    <artifactId>maven-cucumber-reporting</artifactId>
                    <version>5.1.1</version>
                    <executions>
                        <execution>
                            <id>execution</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>generate</goal>
                            </goals>
                            <configuration>
                                <projectName>CucumberReport</projectName>
                                <outputDirectory>${project.build.directory}/site/cucumber-reports</outputDirectory>
                                <!-- <cucumberOutput>${project.build.directory}/cucumber.json</cucumberOutput> -->
                                    <cucumberOutput>${project.build.directory}/cucumber.json</cucumberOutput>
                                <!-- <parallelTesting>false</parallelTesting> -->
                                <buildNumber>1</buildNumber>
                                <checkBuildResult>false</checkBuildResult>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
@CucumberOptions(features="testFeature",glue= {"stepDefinitions"}
,plugin={"html:target/site/cucumber-pretty","json:target/cucumber.json"},monochrome=true)
public class TestRunnerTestNG extends AbstractTestNGCucumberTests{