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 .
Asked
Active
Viewed 837 times
0
-
Did you find any solution for this? – ishwr Feb 19 '20 at 16:04
1 Answers
1
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.

tryingToLearn
- 10,691
- 12
- 80
- 114
-
Thanks for the reply. But actually I am using Cucumber-Junit TestRunner file. gherkin with qaf is for TestNG .right ? Can I get a perfect solution with Selenium-Cucumber maven with Junit ? – Milu Sep 20 '18 at 09:59