Run all specs from command line in cypress

Viewed 294

How can I run all specs from command line in cypress? I have 3 spec files which depends on each other and browser shouldn't reset after each test.

"But when you click on "Run all specs" button after cypress open, the Test Runner bundles and concatenates all specs together..."

I want to accomplish the exact same thing through the command line.

1 Answers

You might not like this answer, but you're going head first against the wall there.

One of goals in pretty much any testing project is making your tests completely independent from one another, and there's plenty of reasons to do so, with just a few being:

  1. You don't care if one test failed and the chain is broken.
  2. Similarly, changing/updating one test case doesn't break a chain.
  3. You can run your tests in parallel, which is a serious point in any projects that plan to scale.

As far as I know, this browser/runner reset after each spec file is desired behavior from cypress side to make parallelization possible (but I can't remember where I read it), so I don't think there's any workaround for your problem.

Related