Warn tests that are slow to running
This package is auto-updated.
Last update: 2022-01-07 16:54:19 UTC
Showing tests that are very slow to running.
require key of your
composer.json add the following line:
Run the Composer update command:
$ composer update
Add in your
<phpunit> ... <listeners> <listener class="GuilhermeGuitte\LaravelSlowTest\RunTimeListener" file="vendor/guilhermeguitte/laravel-slow-test/src/GuilhermeGuitte/LaravelSlowTest/RunTimeListener.php"/> </listeners> </phpunit>
You can specify the maximum execution by tests (default value is
100 ms), creating
<? php return array( 'max_execution_time' => 50 // ms );
Following principles of Uncle Bob (Robert C. Martin), the Clean Code book, he says that all tests should be FIRST, speaking of ** F ** specifically:
- F ast: All tests must run fast, slowness is a code smell for dependent tests and design problems. If they are slow you end up not running often doesn't have feeback early about a possible problem in the code.
Laravel Slow Test aims to assist in finding slow down. Initially, a small project you do not notice much difference, few tests, but when the project grows, you see how that makes a big difference.
Laravel-slow-test is free software distributed under the terms of the MIT license