johnkary / phpunit-speedtrap

Reports on slow-running tests in your PHPUnit test suite
MIT License
783 stars 62 forks source link

Annotations for higher thresholds #2

Closed jakeasmith closed 10 years ago

jakeasmith commented 10 years ago

Overall we want a low threshold, but we have a few tests that run longer and we're okay with that. I don't want to bump up the threshold across the board, but I don't want to get used to seeing slow tests either.

Would it be possible to add a custom annotation for changing the threshold on specific tests?

johnkary commented 10 years ago

Hey Jake, I have added this feature in 7cd1833. You can now use @slowThreshold 5000 on a test method to set the slow threshold higher for just that test case. I have updated the README with the full example.

jakeasmith commented 10 years ago

Thanks a ton!