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: Fail fast option #1841

Closed
jtdLab opened this issue Jan 9, 2023 · 2 comments · Fixed by #2040
Closed

feat: Fail fast option #1841

jtdLab opened this issue Jan 9, 2023 · 2 comments · Fixed by #2040

Comments

@jtdLab
Copy link

jtdLab commented Jan 9, 2023

Add an option --fail-fast to exit the test process when the first failed test occurs.

This is especially useful in CI environments where running more tests leads to unnecessary costs.

@natebosch
Copy link
Member

I can imagine two levels of fast failure - one level would skip the tearDown and any pending async work for the current test, and try to exit as fast as possible. The other would wait for any ongoing test and still run tearDown, but wouldn't run any more setUp or test.

Which level would be most useful? I'd lean towards implementing the latter, but I could also imagine implementing both.

@jtdLab
Copy link
Author

jtdLab commented Jun 16, 2023

The 2nd approach sounds good to me.

natebosch added a commit that referenced this issue Jun 20, 2023
Closes #1841

Add a `--fail-fast` flag which stops running test cases after the first
failure.

- In the Engine, check for failed tests immediately after running them.
  When fast failures are enabled `close()` the engine after any failure.
  Cleanups teardowns and cleanups will run, and any concurrently running
  tests in other suits will finish, but no further tests will start.
- Add the argument in `Configuration` and parse it with the args.
natebosch added a commit that referenced this issue Aug 3, 2023
Closes #1841

Add a `--fail-fast` flag which stops running test cases after the first
failure.

- in the engine, check for failed tests immediately after running them.
  when fast failures are enabled `close()` the engine after any failure.
  Teardowns and cleanups will run, and any concurrently running tests in
  other suits will finish, but no further tests will start.
- add the argument in `configuration` and parse it with the args.
- add a test with a failing case that prevents later tests from running.
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 a pull request may close this issue.

2 participants