PHPackages                             hot/phpunit-runner - 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. hot/phpunit-runner

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

hot/phpunit-runner
==================

The lib allows to watch phpunit tests

005.x-dev(12y ago)3066.9k↓33.3%84MITPHPPHP &gt;=5.4.0

Since Sep 23Pushed 10y ago6 watchersCompare

[ Source](https://github.com/slavahatnuke/hot-phpunit-runner)[ Packagist](https://packagist.org/packages/hot/phpunit-runner)[ Docs](https://github.com/slavahatnuke/hot-phpunit-runner)[ RSS](/packages/hot-phpunit-runner/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (4)

hot/phpunit-runner
==================

[](#hotphpunit-runner)

`Requirements: php, phpunit, git, find`

### Watcher for php classes and tests

[](#watcher-for-php-classes-and-tests)

`bin/hot-phpunit-runner --config=app/phpunit.xml --watch`

- When you change entity `XXXClass` this watcher looking for and run tests for this entity.
- When you change test for entity `XXXClassTest` this watcher run this test too.

```
PHPUnit HotRunner has been started

> phpunit -c app/phpunit.xml ./src/.../....../XXXClassTest.php

PHPUnit 3.7.21 by Sebastian Bergmann.

Configuration read from /Users/slava/project/xxx/app/phpunit.xml

....

Time: 1 second, Memory: 10.00Mb

OK (4 tests, 9 assertions)

[OK]

```

**\[notice\]** If you run `bin/hot-phpunit-runner` without any options then you run all tests (or test for entity) based on `git status` (one time). FYI, runner will not run tests next time. ( result is cached for watcher )

#### Default running looks like:

[](#default-running-looks-like)

- `bin/hot-phpunit-runner --watch`
- `bin/hot-phpunit-runner --config=app/phpunit.xml --watch`

#### Options

[](#options)

```
 --config=app/phpunit.xml # custom phpunit config file
 --phpunit-options="-c app/ --testdox" # custom phpunit options (alternative for `--config`)
 --phpunit-bin=bin/phpunit # custom path to phpunit
 --watch # watcher mode
 --period=2 # sec. watcher period
 --clean # this option remove cached result and re-test full
 --test-similarity=100 # percentage of similarity 0..100 (entity vs test)
 --coverage=coverage.xml # collect coverage and write Clover xml
 --on-pass="echo 'pass callback';" # CLI command after pass
 --on-fail="echo 'fail callback';" # CLI command after fail
 --notify # notifications # OSX / UBUNTU notifications

```

#### Install

[](#install)

- composer: `"hot/phpunit-runner": "dev-master"`
-
-

#### Workflows

[](#workflows)

1. `bin/hot-phpunit-runner --watch` # default watcher
2. `bin/hot-phpunit-runner --config=app/phpunit.xml --watch` # with phpunit config file
3. `bin/hot-phpunit-runner --config=app/phpunit.xml --phpunit-bin=bin/phpunit --watch` # with custom `phpunit`
4. `bin/hot-phpunit-runner --clean` # clear cache and re-test changeset (when watcher working)
5. `bin/hot-phpunit-runner --config=app/phpunit.xml --watch --period=1` # with phpunit config hot watcher with `--period=1`
6. `bin/hot-phpunit-runner --config=app/phpunit.xml --watch &` # with phpunit config file and with `&` (background process)
7. `bin/hot-phpunit-runner --watch --test-similarity=50` # default watcher with `--test-similarity=50` # watcher can not find my tests. I need to reduce the similarity.
8. `bin/hot-phpunit-runner --options="-c app/ --testdox" --watch` # watcher with `--options="-c app/ --testdox"` # with custom phpunit options
9. `bin/hot-phpunit-runner --config=app/phpunit.xml --coverage=coverage.xml --watch` # with `--config=app/phpunit.xml --coverage=coverage.xml`. collect coverage just for changes
10. `bin/hot-phpunit-runner --notify --watch` # OSX / UBUNTU notifications

#### PhpStorm

[](#phpstorm)

Highlight coverage in PhpStorm

`bin/hot-phpunit-runner --config=app/phpunit.xml --coverage=coverage.xml --watch` # required `--config=app/phpunit.xml` phpunit config file, in this case runner collect coverage for changes

plugin: [download](plugin/phpunit_codecoverage_display.jar)[wiki](https://github.com/oker1/phpunit_codecoverage_display/wiki)[home](http://plugins.jetbrains.com/plugin/6167?pr=phpStorm&showAllUpdates=true)

[![PhpStorm settings](doc/images/coverage_ide_settings.png)](doc/images/coverage_ide_settings.png)

[![PhpStorm highlight](doc/images/coverage_ide_highlight.png)](doc/images/coverage_ide_highlight.png)

or

[![PhpStorm highlight](doc/images/coverage_ide_highlight2.png)](doc/images/coverage_ide_highlight2.png)

#### Notifications

[](#notifications)

`bin/hot-phpunit-runner --notify --watch`

[![osx notification](doc/images/notify_osx.png)](doc/images/notify_osx.png)

[![ubuntu notification](doc/images/notify_ubuntu.png)](doc/images/notify_ubuntu.png)

`--notify` has dependents:

- OSX: `terminal-notifier`
- UBUNTU: `notify-send` [man](http://manpages.ubuntu.com/manpages/hardy/man1/notify-send.1.html)

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity39

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 96.6% 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 ~1 days

Total

3

Last Release

4619d ago

Major Versions

001.x-dev → 002.x-dev2013-09-23

002.x-dev → 005.x-dev2013-09-24

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/302592?v=4)[slava hatnuke](/maintainers/slavahatnuke)[@slavahatnuke](https://github.com/slavahatnuke)

---

Top Contributors

[![slavahatnuke](https://avatars.githubusercontent.com/u/302592?v=4)](https://github.com/slavahatnuke "slavahatnuke (57 commits)")[![makasim](https://avatars.githubusercontent.com/u/143206?v=4)](https://github.com/makasim "makasim (1 commits)")[![waterfoul](https://avatars.githubusercontent.com/u/2756150?v=4)](https://github.com/waterfoul "waterfoul (1 commits)")

---

Tags

phpphpunittesttestsobserverrealtimegitciwatcherdaemonfindhot

### Embed Badge

![Health badge](/badges/hot-phpunit-runner/health.svg)

```
[![Health](https://phpackages.com/badges/hot-phpunit-runner/health.svg)](https://phpackages.com/packages/hot-phpunit-runner)
```

###  Alternatives

[derptest/phpmachinist

Testing object factory for PHP

3636.9k1](/packages/derptest-phpmachinist)[phpmachinist/phpmachinist

Testing object factory for PHP

3630.7k](/packages/phpmachinist-phpmachinist)

PHPackages © 2026

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