question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature: Stop Cypress when there are too many failed tests

See original GitHub issue

Current behavior:

Sometimes a feature I work on breaks a lot of tests in the CI build. I have to wait until all tests are finished until I can figure out what happened, which can take very long due to long timeouts.

Desired behavior:

Being able to set a variable in cypress.json to stop the Cypress test execution and fast-forward to uploading the data to the Cypress dashboard when a specific number of test failures is exceeded.

For example in cypress.json:

{
  "maxFailedTests": 10
}

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:9
  • Comments:8 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
jennifer-shehanecommented, Apr 17, 2018

We’ve definitely discussed this and other variants of this internally in terms of improving ‘failure workflow’. Thanks for opening this issue!

1reaction
dcastilcommented, Apr 18, 2018

@brian-mann I just tested it but Cypress doesn’t log cy.log()s to the console. Is there a way to print a status from within a test? So I have something like this in the console:

log: logs in 'proposal-submitted-2' without UI
log: navigates through recap
log: selects joint account
…
✓ registration joint account happy path (26867ms)
Read more comments on GitHub >

github_iconTop Results From Across the Web

Test Retries - Cypress Documentation
With test retries, Cypress is able to retry failed tests to help reduce test flakiness and continuous integration (CI) build failures. By doing...
Read more >
Cypress: interrupt all tests on first failure - Stack Overflow
We are using semaphore to launch complete e2e tests with Cypress for each PR. But it takes too much time. I'd like to...
Read more >
3 Practices to Reduce Flakiness in Cypress Tests - Atomic Spin
and the assertion fails, Cypress will only retry the .find() command, instead of starting from the beginning of the chain and retrying .get()...
Read more >
Cypress and Flaky Tests: How to Handle Timeout Errors
Lastly, Cypress also offers a flaky test detection feature on the Cypress Dashboard. If the “test retries” option is enabled, this feature will ......
Read more >
Cypress.io — Best practices for maintainable tests - ITNEXT
A test isn't given much thought until it fails. Tests should be written for the failure case. Cypress creates an outline in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found