在我的POM.XML中 我添加了黄瓜jvm和maver surefire的2个插件
我创建了runnerClass并添加:
@RunWith(Cucumber.class)
@CucumberOptions(
features = {....},
glue={...})
public class RunnerTest extends AbstractTestNGCucumberTests{}
现在,我无法进行测试 如何使用cucumber-jvm或selenium grid在浏览器中并行运行不同的功能
答案 0 :(得分:0)
将其用于使用带有Cucumber的AbstractTestNg的并行执行(Gherkin场景),它将并行运行本地和远程(SauceLabs或Browserstack)测试。
@CucumberOptions(
features = { "src/test/resources/features/vs/" },
plugin = { "pretty", "json:target/jsonReports/cucumber-parallel.json"
, "junit:target/junit_reports/Cucumber.xml" },
glue = { "com.lbrands.etaf.stepdefs" },
strict = true,
tags = { "not @ignore", "not @wip" },
monochrome = true)
public class RunCukesTest extends AbstractTestNGCucumberTests {
@DataProvider(parallel = true)
@Override
public Object[][] scenarios() {
return super.scenarios();
}
@BeforeSuite
public static void preTestSteps() {}
@AfterSuite
public void reportGenerator() {}
}