PHPackages                             keystone/phpunit-broom-wagon - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. keystone/phpunit-broom-wagon

ActiveLibrary[Testing &amp; Quality](/categories/testing)

keystone/phpunit-broom-wagon
============================

Find slow tests within your PHPUnit test suite.

1.0.0(9y ago)1370MITPHPPHP &gt;=5.6

Since Feb 5Pushed 9y agoCompare

[ Source](https://github.com/keystonephp/phpunit-broom-wagon)[ Packagist](https://packagist.org/packages/keystone/phpunit-broom-wagon)[ RSS](/packages/keystone-phpunit-broom-wagon/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (2)Used By (0)

PHPUnit Broom Wagon
===================

[](#phpunit-broom-wagon)

A PHPUnit test listener that reports on slow-running tests. Forked from [johnkary/phpunit-speedtrap](https://github.com/johnkary/phpunit-speedtrap) to allow more control over slow thresholds and support for PHPUnit 5.

### Broom Wagon?

[](#broom-wagon)

The broom wagon is the name given to the vehicle that follows a cycling road race "sweeping" up stragglers who are unable to make it to the finish of the race within the time permitted. As a cyclist it makes sense to me.

[![Broom wagon](https://camo.githubusercontent.com/76cc22ee0bae3c3509e2e8bb20ce1d580a1e70fda6e186ca064813e3253e6261/687474703a2f2f692e696d6775722e636f6d2f394b76704b646f2e6a7067)](https://camo.githubusercontent.com/76cc22ee0bae3c3509e2e8bb20ce1d580a1e70fda6e186ca064813e3253e6261/687474703a2f2f692e696d6775722e636f6d2f394b76704b646f2e6a7067)

Installation
------------

[](#installation)

Install via Composer

```
composer require --dev keystone/phpunit-broom-wagon
```

Usage
-----

[](#usage)

Enable the listener by adding it to your `phpunit.xml` configuration file.

```

```

Now run your test suite as normal. If tests take longer than the slow threshold (500ms by default), then they will be reported on in the console after the suite completes.

```
PHPUnit 5.7.5 by Sebastian Bergmann and contributors.

..........                                                        10 / 10 (100%)

Recorded 6 slow tests:
 1. 516ms to run ExampleTest:testSomething (expected
                        1000

                        5000

                10

```

**Suite threshold** (default 500ms):

The first argument is the overall suite threshold. This is the number of milliseconds a test can take to execute before it is deemed as slow.

**Group thresholds**:

The second argument is an array of group thresholds. Each test `@group` annotation can have a different threshold. A use case for this is to group all tests that hit the database and be a little more relaxed with the slow threshold.

**Report length** (default 10):

The third argument is the number of slow tests to display in the PHPUnit output.

Annotations
-----------

[](#annotations)

The `@slowThreshold` annotation can be added to test classes or test methods to override any suite or group thresholds.

```
/**
 * @slowThreshold 2000
 */
class SomeTestCase extends \PHPUnit_Framework_TestCase
{
    /**
     * @slowThreshold 5000
     */
    public function testLongRunningProcess()
    {
    }
}
```

Credits
-------

[](#credits)

- [Tom Graham](https://github.com/tompedals)
- [John Kary (author of PHPUnit Speed Trap)](https://github.com/johnkary)

License
-------

[](#license)

Released under the MIT Licence. See the bundled LICENSE file for details.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3431d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0108faaeaf073146f428b1f04b42ba469d97bf2a9d14f31183a2b541f3de8197?d=identicon)[tompedals](/maintainers/tompedals)

---

Top Contributors

[![tompedals](https://avatars.githubusercontent.com/u/6132043?v=4)](https://github.com/tompedals "tompedals (16 commits)")

---

Tags

phpunitphpunit-listenertestsphpunitprofileslow

### Embed Badge

![Health badge](/badges/keystone-phpunit-broom-wagon/health.svg)

```
[![Health](https://phpackages.com/badges/keystone-phpunit-broom-wagon/health.svg)](https://phpackages.com/packages/keystone-phpunit-broom-wagon)
```

###  Alternatives

[johnkary/phpunit-speedtrap

Find and report on slow tests in your PHPUnit test suite

78338.4M130](/packages/johnkary-phpunit-speedtrap)[brianium/paratest

Parallel testing for PHP

2.5k129.9M913](/packages/brianium-paratest)[ergebnis/phpunit-slow-test-detector

Provides facilities for detecting slow tests in phpunit/phpunit.

1489.3M94](/packages/ergebnis-phpunit-slow-test-detector)[spatie/phpunit-snapshot-assertions

Snapshot testing with PHPUnit

69619.1M606](/packages/spatie-phpunit-snapshot-assertions)[allure-framework/allure-phpunit

Allure PHPUnit integration

6613.2M44](/packages/allure-framework-allure-phpunit)[facile-it/paraunit

paraunit

145802.1k15](/packages/facile-it-paraunit)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
