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

MiniTest: optionally fail fast #1230

Merged

Conversation

fallwith
Copy link
Contributor

To have MiniTest "fail fast" and halt after encountering the first
failed test, set the "MT_FAIL_FAST" environment variable and then
proceed to run the tests as normal.

To have MiniTest "fail fast" and halt after encountering the first
failed test, set the "MT_FAIL_FAST" environment variable and then
proceed to run the tests as normal.
@github-actions
Copy link

Simplecov Report

Coverage Threshold
Line 64.99% 60%
Branch 34.49% 30%

Copy link
Contributor

@tannalynn tannalynn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this change apply to just one Minitest run? Like with multiverse, would one suite failing stop the rest of the suites after that? I see that its using an env variable, but I wasn't sure how this is working

@fallwith
Copy link
Contributor Author

Will this change apply to just one Minitest run? Like with multiverse, would one suite failing stop the rest of the suites after that? I see that its using an env variable, but I wasn't sure how this is working

Great question. While I had intended this to only be used for local dev for now, I expected it to work for both the unit tests and the multiverse tests. But it seems that it currently only works for the unit tests.

I still get value from it as is, but I'll look into a solution that works across both sets of tests.

@tannalynn
Copy link
Contributor

tannalynn commented Jun 30, 2022

Will this change apply to just one Minitest run? Like with multiverse, would one suite failing stop the rest of the suites after that? I see that its using an env variable, but I wasn't sure how this is working

Great question. While I had intended this to only be used for local dev for now, I expected it to work for both the unit tests and the multiverse tests. But it seems that it currently only works for the unit tests.

I still get value from it as is, but I'll look into a solution that works across both sets of tests.

That makes sense, thank you for explaining that!

@fallwith fallwith merged commit f7a647f into dev Jul 5, 2022
@fallwith fallwith deleted the fail_fast_interrupt_young_and_leave_a_good_looking_backtrace branch July 5, 2022 18:31
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.

2 participants