-
Notifications
You must be signed in to change notification settings - Fork 35
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
Add Repeat and Retry functionality to sigh test #2590
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
|
I signed it! |
CLAs look good, thanks! |
Check the return-code you're generating? If any test fails you should return non-zero for the test phase.
|
LGTM, Raul for approval. |
I don't see why we would want to repeat or retry tests within one run. What does it even mean if the tests pass on one repeat and then fail on another, other than that the tests are flaky? Furthermore, it seems that if the last run succeeds, the user won't even see any failing output, because that will have scrolled off the screen. Correct me if I'm mistaken, and please elaborate as to what purpose repeats and retries serve. |
Friendly reminder to please discuss changes (such as this) which have the potential to change development practices for all of us in a team meeting, ideally before starting development. |
For folks tuning in, this work was done to specifically address issue #779 My apologies for not bringing this up in a larger context. It was deemed something simple enough as a good-first-issue. |
Raul suggested that this needs to have summary output at the end. |
Yes. If the idea is to help diagnose flaky tests, as described in #779, then the results must be displayed in some kind of summary, e.g. "x out of y tests succeeded. First failure was repeat N.", or in the case of retries, "Tests succeeded after X retries". |
The mocha.js implementation of Added a summary to the end of the runs. Example output:
|
LGTM, Raul for final approvals. |
Adding the option to allow retries and repeat tests. I initially tried adding repeat functionality directly into mocha by encapsulating
runner.run()
which would allow test pass/fail/end hooks to be added more easily. However, I ran into a mocha implementation issue that requires the entire mocha instance to be re-instantiated and the 'require' cache cleared in between runs.I removed the return from
test()
-- not sure where it's being used.Also, not sure if the package.lock should be excluded // how to auto-exclude it from future commits.