cypress-parallel icon indicating copy to clipboard operation
cypress-parallel copied to clipboard

Random error when running parallel tests in Cypress

Open tgrimmeissen opened this issue 4 years ago • 7 comments

Hi team,

When running my tests with cypress-parallel I encounter about 50% of the time the following error:

image

This error fails the suite so it is problematic.

My main issue issue is that it does not happen consistently. I can run 6 suites in parallel, 2 random ones will encounter this and thus only 4 will finish. Next run it won't happen; next run a different suite gets the error etc.

Have any of you encountered this? If not, any clue how to debug?

Thanks in advance :)

tgrimmeissen avatar Jul 14 '21 14:07 tgrimmeissen

Also getting this same error on some executions.

shrohitpatel avatar Jul 28 '21 19:07 shrohitpatel

It seems to me as a random thrown error caused by a parallelization/system issue. The more threads, the more chances to get that error.

tgrimmeissen avatar Aug 02 '21 11:08 tgrimmeissen

@tgrimmeissen How many parallel thread are you using?Could you please check if you're still getting that error with the new version 0.6.0?

tnicola avatar Dec 04 '21 17:12 tnicola

hi @tnicola , yes this is still happening with the new version. I use 4 threads, but it also can happen with 2/3 threads.

tgrimmeissen avatar Dec 06 '21 14:12 tgrimmeissen

Which Cypress version are you using?Does this happen only using cypress-parallel?Are you running your test on Chrome/Chrome Headless?The more insights you provide the more I can help you solving this issue!

tnicola avatar Dec 06 '21 19:12 tnicola

I am using Cypress 8.7.0 but have the same issue with Cypress 9.0.0. Cypress 9.1.1 doesn't work at all for some reason (cannot launch). Yes this only happens using cypress parallel. Normal headless tests work perfectly.

With Parallel, random (different) errors not related to my tests just pop up randomly: image

I use electron as one of my tests suite only works with electron (not sure why though).

Thanks for the help!

tgrimmeissen avatar Dec 07 '21 09:12 tgrimmeissen

it looks like issue is with your test scripts . I had faced the similar issue with previous version and that time issue was with my test script . I was trying to generate test case during runtime using Foreach for a list of items .

are you using the same approach for generating the tcs? If yes then make sure test cases are able to fetch required data before running the tcs.

ISanjeevKumar avatar Mar 25 '22 17:03 ISanjeevKumar