parallel-testing

1.0.3 • Public • Published

parallel-testing

Build Status

parallel-testing allows the execution of any test frameworks in parallel, dramatically reducing the execution time.

Usage

Install parallel-testing package

npm install parallel-testing --save-dev

Add parallel-testing command to package.json scripts

{
    ...,
    scripts: {
        ...,
        "e2e": "parallel-testing --threads=<NUMBER> --test-cmd='<STRING>' --task-prefix='<STRING>' --specs='<STRING>' --specs-separator='<STRING>' --after-all-cmd='<STRING>'",
    },
    ....
}

parallel-testing args options

Option Description
--test-cmd Command used to run tests.
Add @SPECS as a placeholder in the command; it will be replaced with a comma-separated list of specs.
Add @INSTANCE as a placeholder in the command; it will be replaced with a thread instance ID, useful for report directory names.
--task-prefix Prefix used for the logs.
--specs Test specs pattren, e.g: e2e/**/**.spec.js.
--specs-separator Test spec files separator delimiter, e.g: ,.
--threads Number of parallel threads (Optional).
--max-threads Maximum number of parallel threads (Optional).
--after-all-cmd Command that runs after all tests are done.

parallel-testing with

Cypress

Running Cypress e2e tests parallel, please check Cypress Demo. The demo covers how to generate HTML report with screenshots and videos.

Type Total Threads
Serial 57.8171s 1
Parallel 24.9825s 5

cypress-e2e

Puppeteer

Running Puppeteer e2e tests parallel, please check Puppeteer Demo. The demo covers how to generate HTML report with screenshots.

Type Total Threads
Serial 16.6492s 1
Parallel 8.8565s 5

puppeteer-e2e

NOTE: Tests for each framework are different; please don't use these numbers to compare between these testing frameworks.

The demo statistics are generated using the Gnomon tool.

Package Sidebar

Install

npm i parallel-testing

Weekly Downloads

2

Version

1.0.3

License

MIT

Unpacked Size

17.3 kB

Total Files

8

Last publish

Collaborators

  • shadiabuhilal