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

You don't need this - There is a default PHPUnit feature --order-by=random #30

Closed
ruudk opened this issue Nov 1, 2018 · 2 comments
Closed

Comments

@ruudk
Copy link

ruudk commented Nov 1, 2018

For everybody that finds this repo and wants to try it out: you don't need this.

You can run the following:

vendor/bin/phpunit --order-by=random

To the author: It would be great if you could change the readme of this project to say it's not needed anymore, because PHPUnit has an --order-by=random feature.

Best,

Ruud

@fiunchinho
Copy link
Owner

Nice! Can you send me a link to the PHPUnit docs where this is documented? Thanks!

@ruudk
Copy link
Author

ruudk commented Nov 1, 2018

Can't find the docs, but this is the release: https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-7.3.md#730---2018-08-03

It also supports fixing the seed by doing this:

SEED=$(head -200 /dev/urandom | cksum | cut -f1 -d " ")
echo "Running tests with seed $SEED"
vendor/bin/phpunit --order-by=random --random-order-seed=$SEED

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

No branches or pull requests

2 participants