2017 © Pedro Peláez
 

library laravel-slow-test

Warn tests that are slow to running

image

guilhermeguitte/laravel-slow-test

Warn tests that are slow to running

  • Monday, February 3, 2014
  • by GuilhermeGuitte
  • Repository
  • 2 Watchers
  • 3 Stars
  • 16 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Laravel slow tests

Showing tests that are very slow to running., (*1)

![Example:][1], (*2)

Quick start

Setup

In the require key of your composer.json add the following line:, (*3)

"guilhermeguitte/laravel-slow-test": "dev-master"

Run the Composer update command:, (*4)

$ composer update

Add in your phpunit.xml, (*5)

<phpunit>
 ...
    <listeners>
    <listener class="GuilhermeGuitte\LaravelSlowTest\RunTimeListener" file="vendor/guilhermeguitte/laravel-slow-test/src/GuilhermeGuitte/LaravelSlowTest/RunTimeListener.php"/>
    </listeners>
</phpunit>

Configuration

You can specify the maximum execution by tests (default value is 100 ms), creating test.php at app/config folder:, (*6)

<? php 
    return array(
        'max_execution_time' => 50 // ms
    );

Why be careful with this?

Following principles of Uncle Bob (Robert C. Martin), the Clean Code book, he says that all tests should be FIRST, speaking of ** F ** specifically:, (*7)

  • 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., (*8)

Stay tuned!, (*9)

License

Laravel-slow-test is free software distributed under the terms of the MIT license, (*10)

The Versions

03/02 2014

dev-master

9999999-dev

Warn tests that are slow to running

  Sources   Download

MIT

The Requires

 

by Guilherme Guitte

laravel test illuminate runtime slow