New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cucumberjs-parallel

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cucumberjs-parallel

Run cucumber features or scenarios in parallel with limited threads count

1.2.1
Source
npm
Version published
Weekly downloads
273
10.08%
Maintainers
1
Weekly downloads
 
Created
Source

Cucumberjs Parallel

Run Cucumber Features or Scenarios in Parallel with limited threads count

Build Status npm Dependency Status License

Install

npm install cucumberjs-parallel --save-dev

Notes:

  • The version 1.0.0 was tested with cucumberjs v6.0.5 and Node v12.
  • The module requires node v.^10, if you are using v10, please use --experimental-worker flag. Details

How to use

Commands

  • --parallel-type - either features or scenarios
  • -w, --workers - number of threads. if the value set to 0, the count of threads will equal the number of tasks (features or scenarios)

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

$ node_modules/cucumberjs-parallel/bin/cucumberjs-parallel /path/to/features -r /path/to/step-defs --parallel-type scenarios -w 4 --format json:path/to/file.json

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

$ node_modules/cucumberjs-parallel/bin/cucumberjs-parallel /path/to/features -r /path/to/step-defs -w 0 --format json:path/to/file.json

Run

Supports all the arguments as cucumber-js, however please be careful with --format option, the module supports aggregation of json. the rest of formats might not be working.

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

Module supports JSON format. You can save the JSON output to file by passing the cucumber-format as,

-f json:path/to/file.json

Allure Report

Run Features or Scenarios in Parallel and generate Allure Reports with allure-cucumberjs

Create Reporter file:

const { CucumberJSAllureFormatter } = require("allure-cucumberjs");
const { AllureRuntime } = require("allure-cucumberjs");

function Reporter(options) {
  return new CucumberJSAllureFormatter(
    options,
    new AllureRuntime({ resultsDir: "./allure-results" }),
    {}
  );
}
Reporter.prototype = Object.create(CucumberJSAllureFormatter.prototype);
Reporter.prototype.constructor = Reporter;

exports.default = Reporter;

Then pass with reporter as a Cucumber formatter: --format ./path/to/Reporter.js

e.g.

node_modules/cucumberjs-parallel/bin/cucumberjs-parallel test/features --parallel-type features -w 2 -f allure/Reporter.js

Changelog

changelog

Inspired by

Keywords

cucumber

FAQs

Package last updated on 16 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts