Skip to content
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

feat(cli): add -R, --retries <count> option #2269

Merged
merged 19 commits into from
Sep 8, 2020
Merged

feat(cli): add -R, --retries <count> option #2269

merged 19 commits into from
Sep 8, 2020

Conversation

noomorph
Copy link
Collaborator

@noomorph noomorph commented Aug 12, 2020

Resolves #2073 for users who temporarily cannot rewrite their test suites to make them adhere to jest.retryTimes(n) guidelines. The idea is to keep re-running failed test suites (or files, to be more precise) before either we run out of attempt or succeed with those flaky tests.

This is not a recommended method since it assumes, for example, that if in a 100-tests suite even 1 test fails, we will be re-running the entire test file with those 100 tests again.

To-dos

  • decide what do we do if users write into the same artifacts-location since it is apt to generate suppressed I/O errors in the logs (that is the case when there is no autogenerated ios.sim.release.2020-08-12 13-02-42Z suffix, only artifacts/ folder directly). Now, we support this case: you'll just see (1) (2) (3) prefixes.
  • preceed this PR with the one that fixes env.PATH resolution in detox-cli npm package (not local-cli one).
  • remove remnants of env.PATH PR from this PR
  • check package.json dependencies (maybe some of them should be optional or peer dependencies)
  • tidy "Retrying ..." message
  • check if we can add Mocha support with 5-15 lines (we cannot because Mocha does not support multiple reporters yet) disable the feature for Mocha
  • extract the piggybacking out from JestVerboseReporter
  • add -R test case for local-cli/test.test.js
  • cover splitArgv.js file with tests
  • fix long-standing --debug-synchronization e2e/01.sanity.test.js issue (incorrect boolean handling)
  • update CLI docs

@noomorph noomorph requested review from rotemmiz and d4vidi August 12, 2020 13:27
@noomorph noomorph merged commit 2e8f987 into master Sep 8, 2020
@noomorph noomorph deleted the feat/retyarik branch September 8, 2020 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support artifact collection of test retries (jest.retryTimes(x))
3 participants