How to reuse cypress.run instance? #25083
Unanswered
tommy0831
asked this question in
Questions and Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
cypress.run will start a new cypress instance to run a list of specs passed in. The problem is the specs are queued. If an instanced is queued with all the slow/long running tests, then the whole run will take a long time. What I want to do is start multiple cypress instances thru cypress.run and have them execute the test(s) by taking them from a queue as they finish the current run.
pseudo code
// fire off 3 instances
cypres.run({...}).then((rr) => {
// load test(s) from queue and keep running until no more test in queue
});
cypres.run({...}).then((rr) => {
// load test(s) from queue and keep running until no more test in queue
});
cypres.run({...}).then((rr) => {
// load test(s) from queue and keep running until no more test in queue
});
This way the long test(s) will not be stuck with one cypress instance. And, whoever finishes first will take on the next test from the queue.
Beta Was this translation helpful? Give feedback.
All reactions