/parallel-cucumber-jvm

Wrapper around cucumber-jvm to allow parallel execution of features.

Primary LanguageJavaMIT LicenseMIT

Build Status

Parallel Cucumber JVM

This is a wrapper around cucumber-jvm to allow parallel execution of tests at a feature level.

Maven Artifact

Binaries are available in jCenter

Download

groupId:    com.bishnet
artifactId: parallel-cucumber-jvm 

How to use it

To start a CLI test run use the main method in this class

com.bishnet.cucumber.parallel.cli.Main

The command line API matches that of cucumber-jvm as described here. A single additional argument is supported to control the level of parallelism.

--num-threads <n> # Defaults to the number of available cores if not specified

Features

Thread timeline report

Report for simplify troubleshooting of multithreaded tests

Report example

Usage

--plugin thread-report:threadReportDir/

Limitations

  1. CLI is the only supported execution mechanism.
  2. Specifying a rerun output formatter is not safe as all threads will attempt to update the same file. Specifying a rerun file as the input of scenarios to run is fine.
  3. Only the cucumber-java backend has been tested. Other backends may or may not work correctly.

How it works

  1. The list of features to be executed is gathered based on the command line constraints provided.
  2. The list of features is split into a number of chunks equal to the number of threads required.
  3. Rerun formatted files are written to the JVM temp directory, one for each thread containing all the scenarios the thread should run.
  4. A cucumber-jvm runtime is started in each thread taking the temporary rerun file as input. The output is written to an HTML and/or JSON report for the thread in the JVM temp directory dependent on the output formats requested on the command line.
  5. The temporary HTML and/or JSON reports generated by the individual threads are merged into a single report and placed in the location specified on the command line.