Cypress: Define different baseurls for different Parallelization groups

Created on 22 Mar 2019  路  2Comments  路  Source: cypress-io/cypress

My company has artifacts that don't support multisessions (in mock mode) and they can only serve on user at a time.

If you want to tests artifacts that don't support multisessions there is no way to test them in an paralelized way. Right now my company uses a selenium hub with 6 browsers and 6 test stages plus a self-written orchestrator that makes sure that every test stream only connects to one stage. I would like to switch this system to cypress.

Current behavior:

You can paralelize the test cases and let them run on many machines:
https://docs.cypress.io/guides/guides/parallelization.html#Overview

All tests on all machines behave in the same way. All machines will conect to the same baseURL.

Desired behavior:

I want to be able to define different endpoints for the paralelization. Maybe something like this:

cypress run --record --group 2x-chrome --parallel --baseURL1 stage1.intern --baseURL2 stage2.intern

All tests in group 1 would only conect to baseURL1 and alls tests in group2 would only conect to baseURL2

This would ensure that every machine only conects to one defined stage and that there are never two tests running on one stage at once.

Versions

Cypress 3.2.0

existing workaround

Most helpful comment

Hey @stefangrotz, you should be able to achieve this by running 2 groups on 2 machines like below:

CYPRESS_BASE_URL=http://stage1.intern cypress run --record --parallel --group stage1
CYPRESS_BASE_URL=http://stage2.intern cypress run --record --parallel --group stage2

All 2 comments

Is it something like this? the firsttest case need to be on url1 and second test case on url2 ? i am also facing same issue

Hey @stefangrotz, you should be able to achieve this by running 2 groups on 2 machines like below:

CYPRESS_BASE_URL=http://stage1.intern cypress run --record --parallel --group stage1
CYPRESS_BASE_URL=http://stage2.intern cypress run --record --parallel --group stage2
Was this page helpful?
0 / 5 - 0 ratings