Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

cucumber-parallel

gkushang5.1kMIT2.0.3

Run cucumber-js features in parallel

cucumber, parallel, concurrent, cucumber-js, cucumber-parallel

readme

Cucumber Parallel

Run Cucumber Features and Scenarios in Parallel

Build Status npm Dependency Status License

For HTML Reporting, head over to cucumber-html-reporter

Install

npm install cucumber-parallel --save-dev

Notes:

Very simple to use

--parallel ::parallelTypes::

parallelTypes: ['scenarios', 'features']

To run Scenarios in Parallel, pass process.argv --parallel scenarios

$ node_modules/cucumber-parallel/bin/cucumber-parallel /path/to/features -r /path/to/step-defs --parallel scenarios -f json:path/to/file.json

It runs Features in parallel by default, or by passing --parallel features process argument

$ node_modules/cucumber-parallel/bin/cucumber-parallel /path/to/features -r /path/to/step-defs -f json:path/to/file.json

Run

Supports all the arguments as cucumber-js, except --format as explained above

$ node_modules/cucumber-parallel/bin/cucumber-parallel /path/to/features -r /path/to/step-defs -f json:path/to/file.json --tags=@myTag 

Re-run failed scenarios in parallel


$ node_modules/cucumber-parallel/bin/cucumber-parallel /path/to/eachFeatureSeperatedBySpaceWithScenarioLine -r /path/to/step-defs -f json:path/to/file.json --tags=@myTag

/path/to/eachFeatureSeperatedBySpace : path/to/feature:scenarioLine path/to/feature:scenarioLine

E.g.


$ node_modules/cucumber-parallel/bin/cucumber-parallel /path/to/login.feature:10:20:25 path/to/signup.feature:18 -r /path/to/step-defs -f json:path/to/file.json --tags=@myTag

Format

Because it runs features/scenarios in parallel, it only supports JSON format. You can save the JSON output to file by passing the cucumber-format as,

-f json:path/to/file.json

Above example will run login & signup features in parallel; two processes in parallel since two features are passed. Total 4 scenarios will run. You can run all 4 in parallel by passing as below,

/path/to/login.feature:10 /path/to/login.feature:20 /path/to/login.feature:25 path/to/signup.feature:18

HTML Reports

Run Features or Scenarios in Parallel and generate HTML Reports with cucumber-html-reporter

Cucumber-Parallel is also integrated with HTML reporting Grunt Cucumber module grunt-cucumberjs

Sample HTML Reports:

  1. Bootstrap Theme Reports with Pie Chart
  2. Foundation Theme Reports
  3. Simple Theme Reports

Changelog

changelog

changelog

CHANGELOG

2.0.3 (2017-06-27)

  • Fixed timeout issue to consolidate the results of all scenarios those ran in parallel PR#17.

2.0.2 (2017-06-27)

  • Fixed issue where scenarios are run more than once PR#16.

2.0.1 (2017-06-26)

  • Fixed the issue with Feature path

2.0.0 (2017-06-19)

Support for Cucumber 2