Tree55Topz
Tree55Topz

Reputation: 1142

Running cucumberJS feature files in parallel

I am wondering if CucumberJS can handle running feature files in parallel. Currently, we handle parallel testing by using a handful of Jenkins jobs that point to different test directories at the same time and pass it to the selenium grid hub. This works since the hub will now handle the requests it receives and run them in a sort of forced "parallel." The main goal that we want is to run our tests, and set up a max number of sessions, say 4, so that way there are 4 feature files that can essentially run at one time.

I know that cucumber does not have good support for this, and I am doubtful that cucumberjs will - but I am sure there is some sort of npm module out there that someone has had some success with. Any help would be of great benefit to my team and the rare to find cucumberjs/protractor users elsewhere!

Upvotes: 1

Views: 2589

Answers (1)

wswebcreation
wswebcreation

Reputation: 2375

If you are using CucumberJS with Protractor you can enable this with:

  • using multiCapabilities, see for example here
  • and adding shardTestFiles: true, see here to your capabilities
  • Use maxInstances here to limit the max amount of the same browser that are pulled up in parallel
  • and use maxSessions here to limit the max amount of the drivers that are pulled up in parallel

Upvotes: 1

Related Questions