npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cucumberjs-parallel

v2.0.2

Published

Run cucumber features or scenarios in parallel with limited threads count

Downloads

537

Readme

CucumberJS Parallel

Run Cucumber Features or Scenarios in Parallel with limited threads count

Build Status npm License

Install

Cucumber 6

npm install [email protected] --save-dev

Cucumber 7

npm install cucumberjs-parallel --save-dev

Notes:

  • The versions 1.x.x were tested with cucumberjs v6.0.5 and Node v12.
  • The versions 2.x.x were tested with cucumberjs v7.3.1 and Node v14.16.0.
  • 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

CucumberJS 7 and higher doesn't work with AllureJS last version (2.0.0-beta.14)

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