cypresscypress-cucumber-preprocessor

Cypress cucumber is slow because it is still counting down on skipped tests - how to ignore them completely?


We're using Cypress and Cucumber. I have a lot of tests as they're going through a lot of combinations on the webpage, so I end up with about 1,600 single steps.

To be able to do a quick smoke test I have separated those tests into 40 scenarios and marked them with tags, usually just running the first important tag on deployment and the full suite only nightly.

But I noticed, after the tests of the "good" tag are done (which takes about 2 minutes), Cypress still hangs for about 10 more minutes. Running in headed mode, I found out that is is still going through the whole list of 1,600 tests, just counting most of them as "pending". It manages to count about 2 to 3 tests per second. Chrome is running at 100% CPU during that counting, and this process is even part of the generated video file.

Here's an example of the output after the tests. Completing the 115 tests took about 2 minutes, the rest was spent in counting the tests where the tag did not match.

$ npx cypress run  --browser chrome --env 'TAGS=@quicktest'
  │ Tests:        1561                                                                             │
  │ Passing:      115                                                                              │
  │ Failing:      0                                                                                │
  │ Pending:      1444                                                                             │
  │ Skipped:      0                                                                                │
  │ Screenshots:  0                                                                                │
  │ Video:        true                                                                             │
  │ Duration:     11 minutes, 42 seconds                                                           │

Is there any way to completely ignore and skip the tests where the scenario tag does not match?


Solution

  • You can try setting omitFiltered to true, using eg.

    $ npx cypress run  --browser chrome --env 'TAGS=@quicktest,omitFiltered=true'
    

    If you can provide a reproducible example, then I might be able to investigate the reason for the slow countdown.