Let's start by running basic sorry-cypress configuration:
docker run -p 1234:1234 agoldis/sorry-cypress-director
We've just launched
director service on
http://localhost:1234 - this service coordinates cypress agents and enables free parallelization.
cy2 is a tiny NPM package that changes cypress API server configuration on-the-fly using environment variable
cy2 passes down all the CLI flags to
cypress , so you can just use
cy2 instead of
npm install cy2 cypressexport CYPRESS_API_URL="http://localhost:1234/"cy2 run --record --key XXX --parallel --ci-build-id `date +%s`
Let's open several terminal windows and run
cypress in each. Make sure you have cypress tests defined in advance (clone https://github.com/agoldis/sorry-cypress-demo.git if you don't have any test handy).
# run in each terminalCYPRESS_API_URL="http://localhost:1234/" cy2 run --parallel --record --key somekey --ci-build-id hello-cypress
You'll notice that different instances of cypress agents are running different tests.
🎉 We've just finished the basic setup of sorry-cypress and ran our tests in parallel!