Iam using Selenium Cucumber Maven framework with Junit. I need to run the feature file in different browsers in parallel(at the same time). Does this work if we pass browsernames like this ? mvn test "-Dbrowser=chrome" , "-Dbrowser=firefox" through command line ? If not please help me with a solution. I have been asking this doubt for 2 weeks and Iam not getting any reply. It would be really great if you guys help me with a solution. Thanks in advance .

1

There are 1 answers

1
tryingToLearn On

You can have a look at this post and this github project:

Basically, you can use gherkin with qaf to do something like this:

<suite name="run test in parallel Suite" parallel="tests" verbose="1" configfailurepolicy="continue" thread-count="2">
      <test name="Tests in FF">
            <parameter name="driver.name" value="firefoxDriver" />           
            <classes>
                  <class name="com.qmetry.qaf.automation.step.client.gherkin.GherkinScenarioFactory" />
            </classes>
      </test>
      <test name="Tests in Chrome">
            <parameter name="driver.name" value="chromeDriver"/>                      
            <classes>
                  <class name="com.qmetry.qaf.automation.step.client.gherkin.GherkinScenarioFactory" />
            </classes>
      </test>
</suite>

Community NOTE : Since the referenced SO post does not have an accepted or upvoted answer, I could not mark this as duplicate.