PHPackages                             testomat/phpunit-printer - 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. testomat/phpunit-printer

AbandonedArchivedPhpunit-printer[Testing &amp; Quality](/categories/testing)

testomat/phpunit-printer
========================

:crystal\_ball: PHPUnit printer, assertion and more...

03PHP

Since May 2Pushed 6y ago1 watchersCompare

[ Source](https://github.com/testomat/phpunit-printer)[ Packagist](https://packagist.org/packages/testomat/phpunit-printer)[ RSS](/packages/testomat-phpunit-printer/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Testomat PHPUnit Printer
========================

[](#testomat-phpunit-printer)

 [![](https://camo.githubusercontent.com/9f468dc578657f718cce82b5009a3df7f3bc225dcf2613349c5d0497ed27abf8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746573746f6d61742f706870756e69742d7072696e7465722e7376673f7374796c653d666c61742d737175617265)](https://github.com/testomat/phpunit-printer/releases) [![](https://camo.githubusercontent.com/a4fe7000eff0deee11fb18648b92bea8bc241cb65e3842d640c073f5c459d4d4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545372e332e302d3838393242462e7376673f7374796c653d666c61742d737175617265)](https://php.net/) [![](https://camo.githubusercontent.com/077ea008635ea429a5616d3ede7d75686a3d3d6ed05b8a4b97a18de332a296e2/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f746573746f6d61742f706870756e69742f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://codecov.io/gh/testomat/phpunit) [![](https://camo.githubusercontent.com/e43e27acff50e6ee0656e0a112d484ff55f844ff10e79b3d17641033ea51d18f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7374796c652d6c6576656c253230372d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265266c6162656c3d7068707374616e)](#) [![](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](http://opensource.org/licenses/MIT)

Provides a PHPUnit printer class, with:

- beautiful error reporting
- slow-running tests reporting
- over assertive test reporting
- provides a beautiful text-coverage output
- provides output for a compact and expanded test runner view

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

[](#installation)

Run

```
$ composer require testomat/phpunit-printer

```

Usage
-----

[](#usage)

Enable the printer by adding the following to your `phpunit.xml` or `phpunit.xml.dist` file:

```

```

Now run your test suite as normal.

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

[](#configuration)

Within the configuration file `testomat.xml` a number of options can be passed to the printer.

First create a `testomat.xml` in the root folder of your project and copy this into it.

```

... printer configuration

```

#### Printer settings

[](#printer-settings)

The printer comes with 2 types of printer views `expanded` and `compact` (default). To change the printer view, use the `type` argument.

```

```

You want to change how the errors printed by the PHPUnit printer, use the `show_error_on` option.

```

```

To print the error after a failed test use `show_error_on="test"`, default is to print the errors after the test runner finished.

> Note: the printer supports all PHPUnit stopOn... settings.

To reduce the exception trace on the beautiful error output, use the ` ...` argument.

```

            vendor/phpunit/phpunit/src
            vendor/mockery/mockery

```

> Note: The PHPUnit and Mockery exception trace, is filtered out by default.

#### Speed trap settings

[](#speed-trap-settings)

By default, the speed trap collector is active, to deactivate the speed trap use `enabled="false"`.

```

```

To change the overall suite threshold from `500` (default) to something higher use the `500` argument.

```

        1000

```

or [PHPUnit annotations](https://phpunit.readthedocs.io/en/9.1/annotations.html), 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()
    {
    }
}
```

To change the default speed trap report length of 10 lowest tests, use the `10` argument.

```

        20

```

#### Over assertive settings

[](#over-assertive-settings)

By default, the over assertive collector is active, to deactivate the over assertive use `enabled="false"`.

```

```

To change the overall suite assertion from `10` (default) to something higher use the `10` argument.

```

        15

```

or [PHPUnit annotations](https://phpunit.readthedocs.io/en/9.1/annotations.html), the `@assertionThreshold` annotation can be added to test classes or test methods to override any suite or group thresholds:

```
/**
 * @assertionThreshold 15
 */
class SomeTestCase extends \PHPUnit\Framework\TestCase
{
    /**
     * @assertionThreshold 20
     */
    public function testLongRunningProcess()
    {
        self::assertTrue(true);
        ...
    }
}
```

To change the default over assertive report length of 10 assertions per tests, use the `10` argument.

```

        20

```

Versioning
----------

[](#versioning)

This library follows semantic versioning, and additions to the code ruleset are performed in major releases.

Changelog
---------

[](#changelog)

Please have a look at [`CHANGELOG.md`](../../CHANGELOG.md).

Contributing
------------

[](#contributing)

Please have a look at [`CONTRIBUTING.md`](../../.github/CONTRIBUTING.md).

Code of Conduct
---------------

[](#code-of-conduct)

Please have a look at [`CODE_OF_CONDUCT.md`](../../.github/CODE_OF_CONDUCT.md).

License
-------

[](#license)

This package is licensed using the MIT License.

Please have a look at [`LICENSE.md`](../../LICENSE.md).

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/ca62e19a98f43cce88fa6733762bebbe26f4e7ee0b3d8defdadfd0b7082f77a0?d=identicon)[dani33](/maintainers/dani33)

---

Top Contributors

[![prisis](https://avatars.githubusercontent.com/u/2716058?v=4)](https://github.com/prisis "prisis (9 commits)")

### Embed Badge

![Health badge](/badges/testomat-phpunit-printer/health.svg)

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

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[beberlei/assert

Thin assertion library for input validation in business models.

2.4k96.9M570](/packages/beberlei-assert)[mikey179/vfsstream

Virtual file system to mock the real file system in unit tests.

1.4k108.0M2.7k](/packages/mikey179-vfsstream)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)

PHPackages © 2026

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