Instead of changing the
api_url in the cypress config, it's also possible to reroute the cypress IP in your
Sorry-cypress includes an executable helper for this, to use it run
sudo sorry-cypress (superuser rights are necessary for editing the hosts file).
This command use hostile to change your hosts file and will start cypress in a child process. Once Cypress is done or killed the rerouting rule in your hosts file will be deleted.
The command will need the following environment variables:
sudo SORRY_CYPRESS_BUILD_ID=build-001 SORRY_CYPRESS_RECORD_KEY=whatever SORRY_CYPRESS_API_IP=127.0.0.1 ./bin/sorry-cypress.js <other cypress arguments>