-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix randomization seed #1329
Fix randomization seed #1329
Conversation
39dfe92
to
7df75c5
Compare
If you don't explicitly pass a seed, cucumber would inform it has run test with an incorrect seed, so it would be impossible to actually reproduce a failing run.
7df75c5
to
73da89e
Compare
I rebased this PR that should be fully focused now and I added a changelog entry for it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems legit. Don't know what the string output lookslike that you're regex sanitizing, but assume thats fine
It's the information about the running time, something like "0m1.234s", which obviously might differ for both runs. |
Ok, going in! Thanks for your review @luke-hill! |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
While debugging some apparently order dependent failures on my cucumber scenarios, I noticed that it's currently impossible to reproduce order dependent failures, because the seed cucumber says it has used is not the seed it has really used.
Details
My changes make sure that the seed that cucumber uses to randomize the scenarios is the same that cucumber informs in the UI, so the same scenario order can actually be reproduced in subsequent runs.
In order to test this, I needed to use some stuff from newer versions of
aruba
, so I upgraded the scenarios to use that first. Happy to extract that to a separate PR, of course.Motivation and Context
This change makes it possible to reproduce order dependent failures when running scenarios in random order. Previously, it was not working.
How Has This Been Tested?
I added a test that runs cucumber in random order and with summary format, then runs cucumber again with the seed the previous command informed, and then checks that both commands give the same output (excluding runtime).
Screenshots (if appropriate):
Types of changes
Checklist: