cypress-plugin-retries
cypress-plugin-retries copied to clipboard
Cypress retry stuck for last test when running cypress tests in parallel on docker
I have a cypress suite where we are running bunch of cypress test files with 2-3 tests each and for the last test if it fails then its retries and that is stuck forever
@psurana0329 this is likely. Do you have a reproducible example you can give?
i can repro this consistently, basically symptom i am seeing is that if i have a cyrun file that is executing a bunch of specs parallely and the last one if failed then is stuck in a loop. Any idea how could we resolve this. i added : require('cypress-plugin-retries'); beforeEach(() => { Cypress.env('RETRIES', 2); });
☝️ logic is in index.js which assures 2 retries for all the tests i am executing. Also all the parallel runs are in docker so i only have access to /bin/bash . Let me know if you need any particular logs
@psurana0329 this is not a reproducible example. Here's an example of one, which includes the full code needed to reproduce the problem: https://github.com/Bkucera/cypress-plugin-retries/blob/master/cypress/tests/e2e/after-hook-fail.spec.js
Note this may take some work on your end to isolate the problem, but it's the only way I will be able to investigate this
@Bkucera I cant paste the proprietary code that gives any insight into what is happening in the test but can we create a skeleton example wherein my index.js has: require('cypress-plugin-retries');
beforeEach(() => { Cypress.env('RETRIES', 2); }); and I am running a series of spec files in parallel and noticing that there is one spec that is stuck in forever loop when checked on cypress dashboard. Also please let me know if there is any logging that i can collect from the docker container which is running the stuck spec file.
we create a skeleton example
@psurana0329 yes, this is exactly what I need, could you provide it? I need more information than just what's in the beforeEach. Like a simple 2-3 test "skeleton" example spec that reproduces the issue. The "running a series of spec files in parallel" is what's making this issue ambiguous and non-reproducible