Run Cucumber scenarios in parallel with TestNG
QuizMedium-HardJava onlyAsked in: Accenture, Capgemini, Infosys, SaaS Labs, Swiggy, TCS
Your runner extends AbstractTestNGCucumberTests. How do you make the scenarios run in parallel?
- Override
scenarios()in the runner, annotate it with@DataProvider(parallel = true)and returnsuper.scenarios() - Add parallel="methods" to the feature file
- Split every scenario into its own feature file
- Cucumber cannot run in parallel with TestNG
This question is part of Pro+
Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.