【发布时间】:2021-12-11 09:27:20
【问题描述】:
我有几个跑步者课程说 CucumberLocalTestRunner, CucumberFeatureBranchTestRunner, CucumberMasterTestRunner class 。 这些运行器类使用扩展的黄瓜选项。我使用的是黄瓜 jvm 4.4.0 版。
在 pom 文件中,我设置了与运行器类具有一对一关系的配置文件。
我将如何在 pom 文件中包含 runner 类,这样如果我运行 mvn clean verify -P local 那么只有 CucumberLocalTestRunner 会运行。
其次,我猜测扩展的繁琐选项会在重新运行失败的测试后生成合并的报告。 (即我有三个测试。第一次运行:- 两个通过,一个失败。第二次运行:- 只有失败的一个执行并通过。然后我会看到所有三个通过的报告。)
<profile>
<id>local</id>
<properties>
</properties>
</profile>
<profile>
<id>master</id>
<properties>
</properties>
</profile>
package selenium.runners;
import com.github.mkolisnyk.cucumber.runner.ExtendedCucumber;
import com.github.mkolisnyk.cucumber.runner.ExtendedCucumberOptions;
import cucumber.api.CucumberOptions;
import org.junit.runner.RunWith;
@RunWith(ExtendedCucumber.class)
@ExtendedCucumberOptions(
jsonReport = "target/81/cucumber.json",
jsonUsageReport = "target/81/cucumber-usage.json",
usageReport = true,
detailedReport = true,
detailedAggregatedReport = true,
overviewReport = true,
overviewChartsReport = true,
pdfPageSize = "A4 Landscape",
toPDF = true,
outputFolder = "target/81",
retryCount = 2,
threadsCount = 2)
@CucumberOptions(
glue = {"selenium.stepdefs"},
features = {"src/test/resources/features/"},
plugin = {"json:target/cucumber/cucumber.json", "junit:target/cucumber/cucumber.xml"},
strict = true,
tags = "@local")
public class CucumberLocalTestRunner {}
【问题讨论】:
-
请对此进行任何更新
标签: maven cucumber pom.xml cucumber-jvm cucumber-java