Skip to content

johnykvsky/phpunit-repeat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

phpunit-repeat

Simple Linux shell script to run PHPUnit tests given number of times.

Since --repeat has been removed from PHPUnit and so far (12.3) not been restored yet, here is simple script to help debugging tests randomly failing.

For more details please check this and this.

Usage

phpunit-repeat.sh -r 10 -f myFailingTest
  • -r indicates number of repeats (default: 5)
  • -f passes given parameter to PHPUnit --filter argument (default: no filter)
  • -l phpunit file location (default: vendor-bin)

By default, it will run all tests 5 times. With -f MyTest it will run 5 times only MyTest

If your PHPUnit file is i.e. at vendor/bin/phpunit, just run script as:

phpunit-repeat.sh -r 10 -f myFailingTest -l vendor/bin

License

This script is released under the MIT License. See LICENSE for details.

About

Simple linux shell script to run PHPunit tests given number of times

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages