Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is my draft proposal for new @FixMethodOrder(RANDOM) option. It allows you to shuffle test methods order within test suite. Then it's easier to detect tests that has side effects and affect other test. Typical scenario is when you have a test suite that passes with deterministic and predictable order on one JVM, but fails on other. Random order gives you more confidence that your tests don't rely on each order.
Each test suite has it's own random seed and this seed is displayed. Later on you can recreate the same shuffled order using displayed seed. You can achieve that with new @FixMethodOrder parameter - seed. This is guaranteed by Java Random implementation: "If two instances of Random are created with the same seed, and the same sequence of method calls is made for each, they will generate and return identical sequences of numbers".
I have one problem with this draft. I cannot find a proper way to communicate generated seed to user. There are many runners with different purposes and I'm not sure which solution would be fine here. I've marked these places with TODO mark.
If you like my implementation, please help me with that last point.