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

Omit redandunt execution with rspec --bisect #3100

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

makicamel
Copy link
Contributor

Since bisect is a command that finds minimum repro that fails depending on the order, examples after the last failure example doesn't need to be executed.

@makicamel makicamel force-pushed the omit-redandunt-execution-with-rspec-bisect branch from ef995c7 to e2e1a1f Compare July 10, 2024 11:17
Since bisect is a command that finds minimum repro that fails depending on the order,
examples after the last failure example doesn't need to be executed.
@makicamel
Copy link
Contributor Author

I'm sorry, I made a PR without realizing that the cucumber tests failed. I'll fix it 🙏

@makicamel makicamel marked this pull request as draft July 11, 2024 10:35
@makicamel makicamel force-pushed the omit-redandunt-execution-with-rspec-bisect branch from e2e1a1f to 9660048 Compare July 12, 2024 00:11
When I run `rspec --seed 1234`
Then the output should contain "10 examples, 1 failure"
When I run `rspec --seed 1234 --bisect`
When I run `rspec --seed 9876`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed seed number because when seed is 1234 calculator_1_spec is executed before calculator_20_spec

@@ -28,8 +28,8 @@ Feature: Bisect
end
end
"""
And files "spec/calculator_2_spec.rb" through "spec/calculator_9_spec.rb" with an unrelated passing spec in each file
And a file named "spec/calculator_10_spec.rb" with:
And files "spec/calculator_2_spec.rb" through "spec/calculator_19_spec.rb" with an unrelated passing spec in each file
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I increased the number of files to 20, because with 10 the bisect would complete before abort with Ctr-C.

@makicamel makicamel marked this pull request as ready for review July 12, 2024 00:25
@JonRowe
Copy link
Member

JonRowe commented Jul 13, 2024

I think this behaviour should be at best opt-in because even if we have encountered all the original failures, there might be more failures that occur that would technically make a run a different set of results and thus be an unstable bisect...

@makicamel
Copy link
Contributor Author

Thank you, I'll try it.

@makicamel makicamel marked this pull request as draft July 18, 2024 00:48
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