Home > Software design >  Can we do parallel execution using Cucumber Gradle
Can we do parallel execution using Cucumber Gradle

Time:10-12

Hi i have gone through various articles online but couldn't find any good resource with proper documentation that talks about gradle supporting parallel execution with cucumber. Any proper documentation or and example will help me in adding parallel execution to my existing automation test. My task is simple running different feature files in parallel.

CodePudding user response:

If you use a single suite engine class to load all your cucumber files, then this is your problem. All that Gradle sees, is that single class. Gradle can only deal with test classes, that is why the suite engine workaround is even needed.

If you want to be able to use multiple forks, then you need to create more suite classes, if you want to go for maximum parallelism you'd need a 1-to-1 mapping.

You could try to create those suite classes automatically in a custom task that runs before the test task.

CodePudding user response:

I created a Cucumber runner for Gradle a couple of years ago. The purpose was to run things in parallel. I still use it and sometimes I even get pull requests for improvements.

You might find it useful.

https://github.com/tsundberg/gradle-cucumber-runner

  • Related