jakobbuis/simple-slow-test-reporter

Reports slow tests in your PHPUnit testsuite

v1.0.0 2020-12-26 16:20 UTC

This package is auto-updated.

Last update: 2024-03-26 23:38:37 UTC


README

Reports slow tests in your PHPUnit testsuite

Example output of slow test reporter, highlighting some slow testcases

Requirements

Requires PHPUnit 9.0+

Installation

Add the reporter as a dev dependency:

composer require --dev jakobbuis/simple-slow-test-reporter

Add the extension to your phpunit.xml file as a root-node:

<phpunit>
    [...]
    <extensions>
        <extension class="SSTR\SlowTestReporter" />
    </extensions>
</phpunit>

The default threshold for slow tests is 500 milliseconds. You can configure the limit in the extension:

<phpunit>
    [...]
    <extensions>
        <extension class="SSTR\SlowTestReporter">
            <arguments>
                <integer>1000</integer>
            </arguments>
        </extension>
    </extensions>
</phpunit>

License

MIT