Sometimes a test fails certain times but passes another. If you want to run a test multiple times you can use the following one line bash script:
for i in {1..20}; do php artisan test --filter=TestClassName; done
PHPIn the above replace TestClassName
with the class name of your test. The above case runs the test 20 times. To change the number change the for loop by editing the part between the braces {1..20}
.