6

Start using cypress in docker compose on gitlab, how can I run tests parallel in docker compose? I use this command in docker: npx cypress run -b chrome

What do I need to use for starting tests parallel and combine test results?

Mr. J.
  • 3,499
  • 1
  • 11
  • 25
Kkkk
  • 61
  • 1
  • 2
  • can some one give me example comose file? I understand i need to use several containers for each test suite? there are altar trips if for some reason I cannot use dashboard? – Kkkk May 22 '19 at 14:37

2 Answers2

12

You will still need some type of "dashboard" to coordinate, record and parallelize your tests.

You can either use Cypress.io dashboard, or run your own service that coordinates parallelization.

For example (disclaiming that I am the author): https://github.com/agoldis/sorry-cypress

Cypress.io used to provide free parallelization but recently I have got this message:

This Thursday, July 11, 2019, we will begin enforcing limits on test recordings and based on your organization's recent usage of the Cypress Dashboard, your account will be impacted.

After exceeding 100% of your plan's test recording limit, parallelization will be disabled and new test recordings will be hidden from the dashboard.

Magnolia from Customer Support

Cypress.io provides free access to their dashboard for Open Source projects, and there's also a "free" plan with limited recording and parallelization capacity (as of Sep 24, 2019).

See https://www.cypress.io/pricing/

Community
  • 1
  • 1
agoldis
  • 1,067
  • 16
  • 28
  • Thank you for your link. BTW, can you let me know approximately how many tests you ran which made you hit the limit? I want to get an idea of what causes user to "break" the system, as i am developing something similar and wouldnt want users to "break" my model. – Just a coder Oct 18 '19 at 10:57
  • 1
    I think it was something like 10k tests, To can't remember exactly, also cypress changed the limits since then – agoldis Oct 19 '19 at 16:09
2

The Cypress Dashboard is required to run tests in parallel across machines.

Here's how it works:

  1. The Cypress Dashboard keeps track of how long each of your tests takes every time you run them.
  2. When your CI initially spin up a bunch of machines, they will reach out to the Cypress Dashboard and ask, "hey, what tests should I run?"
  3. The Cypress dashboard knows how many machines you've spun up, and it will delegate tests to them such that the testing completes at roughly the same time on each one.

The Cypress Dashboard parallelization is free for all plans, including the free tier.

Diagram of the above from the parallelization docs

diagram of the above steps

Zach Bloomquist
  • 5,309
  • 29
  • 44