Cucumber 没有创建文件夹,而是创建了一个文件
Cucumber did not create a folder, instead created a file
我尝试在 using cucumber pretty 下创建一个名为 HtmlReports
的文件夹。当我 运行 Runner Class 它创建了一个 HtmlReports
文件而不是创建文件夹。
这是我的代码。
package Stepdefinition;
import org.junit.runner.RunWith;
import io.cucumber.junit.CucumberOptions;
import io.cucumber.junit.Cucumber;
@RunWith(Cucumber.class)
@CucumberOptions(features="src/test/resources/Features",
monochrome = true,
plugin={"pretty","html:target/HtmlReports"}
)
public class Testrunner {
}
有人可以帮我解决这个问题吗?
在 Cucumber v6 中,html 格式化程序有所改进。它now outputs a single page html report。您可以通过添加 .html
扩展名来打开它。
@CucumberOptions(plugin = "html:target/cucumber-report.html")
如果您想创建文件夹而不是文件。
对于 Maven 项目-“cucumber-java & cucumber-JUnit”依赖项版本应低于 v6 或 5.7.0(我曾用于我的项目)
我尝试在 using cucumber pretty 下创建一个名为 HtmlReports
的文件夹。当我 运行 Runner Class 它创建了一个 HtmlReports
文件而不是创建文件夹。
这是我的代码。
package Stepdefinition;
import org.junit.runner.RunWith;
import io.cucumber.junit.CucumberOptions;
import io.cucumber.junit.Cucumber;
@RunWith(Cucumber.class)
@CucumberOptions(features="src/test/resources/Features",
monochrome = true,
plugin={"pretty","html:target/HtmlReports"}
)
public class Testrunner {
}
有人可以帮我解决这个问题吗?
在 Cucumber v6 中,html 格式化程序有所改进。它now outputs a single page html report。您可以通过添加 .html
扩展名来打开它。
@CucumberOptions(plugin = "html:target/cucumber-report.html")
如果您想创建文件夹而不是文件。 对于 Maven 项目-“cucumber-java & cucumber-JUnit”依赖项版本应低于 v6 或 5.7.0(我曾用于我的项目)