-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to retry tests #1515
Comments
👍 from me. Re-running all tests is a waste. |
Just an FYI @kpheng there are a couple of libraries out there that already to this. mocha-retry is one - which allows you to specify a number of retries per |
if this use case is covered by 3p projects, it doesn't need to be in mocha core |
In case you end up here as I did: http://mochajs.org/#retry-tests |
3p = third party |
Tests should be consistent. They should either always fail or always pass. Unit tests are generally pretty consistent. With functional tests, however, several factors outside of our control may cause a test to fail. For example, my functional testing stack consists of MochaJS, WebDriverJS, and BrowserStack. The tests usually pass. However, in some cases, like when the network is congested or BrowserStack is slow in creating a VM session, a test may fail.
Since mocha doesn't support retries yet, I have to re-run test suites in their entirety. With each suite taking a non-trivial amount of time (between 5 to 15 minutes) to complete, this solution isn't ideal.
It would be nice if mocha supported retries. If a test in a suite fails, then I could retry that test instead of of re-running the entire suite.
The text was updated successfully, but these errors were encountered: