GitHub user cardil opened a pull request:
https://github.com/apache/maven-surefire/pull/112
Adding support for externally passed random seed and printing used seed on
console
It's good practice to execute tests in random order. That ensures tests are
atomic and not depend on each other or some stateful entity. But, if such error
occurs, right now, there is no way to reproduce this exact, erroneous execution.
This PR adds the ability to reproduce those errors by adding support for
externally passed random seed. If random seed is not passed, it will be
generated automatically. Also, random seed will be printed on console. That's
enable it to be achieved by CI server for later.
This operation is strongly influenced by Ruby's rspec order command line
option:
https://www.relishapp.com/rspec/rspec-core/v/2-13/docs/command-line/order-new-in-rspec-core-2-8
Showcase of execution:
[](https://asciinema.org/a/42342)
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/wavesoftware/maven-surefire
feature/random-seed-usage
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/maven-surefire/pull/112.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #112
----
commit 6caf9b2819d4d7ded9944240af440a5833de579c
Author: Krzysztof SuszyÅski <[email protected]>
Date: 2016-04-02T17:59:55Z
Adding Randomizer to RunOrder and DefaultRunOrderCalculator, seed is
printed on console output
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]