PHPackages                             lstrojny/phpunit-clever-and-smart - 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. lstrojny/phpunit-clever-and-smart

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

lstrojny/phpunit-clever-and-smart
=================================

A clever test runner for PHPUnit

0.5.0(12y ago)168113.8k↑200%13[10 issues](https://github.com/lstrojny/phpunit-clever-and-smart/issues)3MITPHP

Since Jan 12Pushed 9y ago6 watchersCompare

[ Source](https://github.com/lstrojny/phpunit-clever-and-smart)[ Packagist](https://packagist.org/packages/lstrojny/phpunit-clever-and-smart)[ RSS](/packages/lstrojny-phpunit-clever-and-smart/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (3)Versions (7)Used By (3)

Clever Test Runner for PHPUnit
==============================

[](#clever-test-runner-for-phpunit)

[![Build Status](https://camo.githubusercontent.com/d1651eb51e5566c7cdba0dda9c6804bb4fe846d71f1543ed232594e0d6873dca/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f6c7374726f6a6e792f706870756e69742d636c657665722d616e642d736d6172742e737667)](http://travis-ci.org/lstrojny/phpunit-clever-and-smart) [![Dependency Status](https://camo.githubusercontent.com/2b58c8b8dab3783a7eda3a721afc5798c7368cee4bff9a2f24253c7ccb0f665a/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3534326435646634666333663563643730303030303166622f62616467652e7376673f7374796c653d666c6174)](https://www.versioneye.com/user/projects/542d5df4fc3f5cd7000001fb) [![Average time to resolve an issue](https://camo.githubusercontent.com/c2eef300aecf1d278638a6e80a0ad7f70a4e61ff9306c249c7deeae91e979b86/687474703a2f2f697369746d61696e7461696e65642e636f6d2f62616467652f7265736f6c7574696f6e2f6c7374726f6a6e792f706870756e69742d636c657665722d616e642d736d6172742e737667)](http://isitmaintained.com/project/lstrojny/phpunit-clever-and-smart "Average time to resolve an issue") [![Percentage of issues still open](https://camo.githubusercontent.com/18b123f24b9c6b34e560a5d0aa58d7ad4055ebfff00ca5707b4c9a23b3069348/687474703a2f2f697369746d61696e7461696e65642e636f6d2f62616467652f6f70656e2f6c7374726f6a6e792f706870756e69742d636c657665722d616e642d736d6172742e737667)](http://isitmaintained.com/project/lstrojny/phpunit-clever-and-smart "Percentage of issues still open")

Mission
-------

[](#mission)

Enable fast feedback cycles by storing test case results in a database and reorder tests on consecutive runs in the following order:

1. Failures and errors
2. So far unrecorded tests
3. Remaining tests by execution time in ascendant order (fastest first)

It’s probably not yet very stable but try it out.

### What it does

[](#what-it-does)

Run a test suite once with errors

```
PHPUnit 3.7.28 by Sebastian Bergmann.

.............................................FSFS..............  63 / 280 ( 22%)
............................................................... 126 / 280 ( 45%)
............................................................... 189 / 280 ( 67%)
............................................................... 252 / 280 ( 90%)
.........................

```

Rerun that test suite and see how the previous failing tests have been sorted to the beginning of the test run:

```
PHPUnit 3.7.28 by Sebastian Bergmann.

FSFS...........................................................  63 / 280 ( 22%)
............................................................... 126 / 280 ( 45%)
............................................................... 189 / 280 ( 67%)
............................................................... 252 / 280 ( 90%)
.........................

```

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

[](#installation)

add the following line to your projects' composer.json `require-dev` section.

```
"lstrojny/phpunit-clever-and-smart": "0.*"
```

Configuration
-------------

[](#configuration)

To play around with it, add this to your `phpunit.xml(.dist)`

```

```

you might alter the location of the sqlite storage file, by passing a path to the Sqlite3Storage class:

```

                        /my/path/to/.phpunit-cas.db

```

Roadmap
-------

[](#roadmap)

- Test it with as many test suites as possible
- Stabilize
- Merge into PHPUnit core

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity46

Moderate usage in the ecosystem

Community22

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 81.8% 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

Every ~14 days

Total

5

Last Release

4495d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/79707?v=4)[Lars Strojny](/maintainers/lstrojny)[@lstrojny](https://github.com/lstrojny)

---

Top Contributors

[![lstrojny](https://avatars.githubusercontent.com/u/79707?v=4)](https://github.com/lstrojny "lstrojny (72 commits)")[![staabm](https://avatars.githubusercontent.com/u/120441?v=4)](https://github.com/staabm "staabm (15 commits)")[![uuf6429](https://avatars.githubusercontent.com/u/230049?v=4)](https://github.com/uuf6429 "uuf6429 (1 commits)")

### Embed Badge

![Health badge](/badges/lstrojny-phpunit-clever-and-smart/health.svg)

```
[![Health](https://phpackages.com/badges/lstrojny-phpunit-clever-and-smart/health.svg)](https://phpackages.com/packages/lstrojny-phpunit-clever-and-smart)
```

###  Alternatives

[brianium/paratest

Parallel testing for PHP

2.5k136.1M986](/packages/brianium-paratest)[drupal/core-dev

require-dev dependencies from drupal/drupal; use in addition to drupal/core-recommended to run tests from drupal/core.

2022.6M343](/packages/drupal-core-dev)[webmozarts/strict-phpunit

Enables type-safe comparisons of objects in PHPUnit

30314.4k7](/packages/webmozarts-strict-phpunit)

PHPackages © 2026

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