1

I hava a project with many features, i want to run a test in different browser in parallel using cucumber-jvm-plugin

In my POM.XML i add the 2 plugins of cucumber jvm and maver surefire

i create the runnerClass and add:

@RunWith(Cucumber.class)
@CucumberOptions(
features = {....},
glue={...})
public class RunnerTest extends AbstractTestNGCucumberTests{}

Now, i am not able to run the test How can i run the different features in browser in parallel using cucumber-jvm or selenium grid

user6618310
  • 39
  • 1
  • 5
  • 14

1 Answers1

0

Use this for the parallel execution using AbstractTestNg with Cucumber(Gherkin scenarios) which will run your tests in-parallel both local and remote(SauceLabs or 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() {}
}
mburesh
  • 1,012
  • 5
  • 15
  • 22
Neton Global
  • 44
  • 1
  • 8