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.
We need to override cypress agents configuration to start using the local
# Let's find cypress runner locationDEBUG=cypress:* cypress version# Examine the output, note the path"cypress:cli Reading binary package.json from: /Users/agoldis/Library/Caches/Cypress/6.2.1/Cypress.app/Contents/Resources/app/package.json +0ms"# Now let's override cypress agent configurationvim /Users/agoldis/Library/Caches/Cypress/6.2.1/Cypress.app/Contents/Resources/app/packages/server/config/app.ymlproduction:# api_url: "https://api.cypress.io/"api_url: "http://localhost:1234/"
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 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!