Knapsack Pro

Check out the new docs for the updated documentation.

FAQ / @knapsack-pro/cypress / Knapsack Pro Cypress specific questions

How to run Cypress tests locally with Knapsack Pro?

You can run Cypress tests using @knapsack-pro/cypress on your local machine instead of the CI environment. Running tests locally can be useful if you need to quickly test your configuration before running changes on the CI server.

Create a bash script bin/knapsack_pro_cypress with the following content:


# The CI build ID must have the same value if you would like to simulate running tests on 2 parallel nodes. You could set the value manually.
# Alternatively, you can use openssl to generate a unique CI build ID. This way running the bash script would simulate running a new CI build.
export CI_BUILD_ID=$(openssl rand -base64 32)

$(npm bin)/knapsack-pro-cypress

Then run the following command locally to simulate running tests on the parallel node with index 0 (it's the 1st node out of 2). Note index starts from 0.

bin/knapsack_pro_cypress 0 2

Simulate running tests on the node with index 1 (it's the 2nd node out of 2).

bin/knapsack_pro_cypress 1 2

Start using Knapsack Pro

Sign up and speed up your tests.