PHPackages                             misiuziu/phpunit-coverage-check - 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. misiuziu/phpunit-coverage-check

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

misiuziu/phpunit-coverage-check
===============================

Check the code coverage using the clover report of phpunit

0.2.0(6y ago)037.4kMITPHPPHP &gt;=5.5.0

Since May 9Pushed 6y agoCompare

[ Source](https://github.com/misiuziu/phpunit-coverage-check)[ Packagist](https://packagist.org/packages/misiuziu/phpunit-coverage-check)[ RSS](/packages/misiuziu-phpunit-coverage-check/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (1)DependenciesVersions (7)Used By (0)

[![Build Status](https://camo.githubusercontent.com/52866c2067c04792858d0b7d4600797f0c32dfbb7e97f541688f2014d860cae4/68747470733a2f2f7472617669732d63692e6f72672f726963686172647265676565722f706870756e69742d636f7665726167652d636865636b2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/richardregeer/phpunit-coverage-check)

phpunit-coverage-check
======================

[](#phpunit-coverage-check)

This php script will read the clover xml report from phpunit and calculates the coverage score. Based on the given threshold the script will exit ok of the coverage is higher then the threshold or exit with code 1 if the coverage is lower then the threshold. This script can be used in your continuous deployment environment or for example added to a pre-commit hook.

Installation
============

[](#installation)

The script can be installed using composer. Add this repository as a dependency to the composer.json file.

```
composer require --dev rregeer/phpunit-coverage-check
composer install
```

Usage
=====

[](#usage)

The script has requires 2 parameters that are mandatory to return the code coverage.

1. The location of the clover xml file, that's generated by phpunit.
2. The coverage threshold that is acceptable. Min = 1, Max = 100

Generate the clover xml by using phpunit and run the coverage check script: Run the script:

```
vendor/bin/phpunit --coverage-clover clover.xml
vendor/bin/coverage-check clover.xml 80
```

It's also possible to add the coverage report generation to the phpunit.xml.dist add to following line to the xml file:

```

```

For more information see the [phpunit documentation](https://phpunit.de/manual/5.3/en/index.html). Information about the [configuration file](https://phpunit.de/manual/5.3/en/appendixes.configuration.html#appendixes.configuration) and [commandline options](https://phpunit.de/manual/current/en/textui.html#textui.clioptions).

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~252 days

Recently: every ~315 days

Total

6

Last Release

2445d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/15453093?v=4)[Tomasz Sierżański](/maintainers/misiuziu)[@misiuziu](https://github.com/misiuziu)

---

Top Contributors

[![rregeer](https://avatars.githubusercontent.com/u/4814166?v=4)](https://github.com/rregeer "rregeer (5 commits)")[![richardregeer](https://avatars.githubusercontent.com/u/16963508?v=4)](https://github.com/richardregeer "richardregeer (4 commits)")[![Krinkle](https://avatars.githubusercontent.com/u/156867?v=4)](https://github.com/Krinkle "Krinkle (3 commits)")[![misiuziu](https://avatars.githubusercontent.com/u/15453093?v=4)](https://github.com/misiuziu "misiuziu (3 commits)")[![sanmai](https://avatars.githubusercontent.com/u/139488?v=4)](https://github.com/sanmai "sanmai (1 commits)")

---

Tags

phptestingphpunitciunittestcode coverage

### Embed Badge

![Health badge](/badges/misiuziu-phpunit-coverage-check/health.svg)

```
[![Health](https://phpackages.com/badges/misiuziu-phpunit-coverage-check/health.svg)](https://phpackages.com/packages/misiuziu-phpunit-coverage-check)
```

###  Alternatives

[rregeer/phpunit-coverage-check

Check the code coverage using the clover report of phpunit

636.5M209](/packages/rregeer-phpunit-coverage-check)[robiningelbrecht/phpunit-coverage-tools

PHPUnit coverage tools

17143.1k47](/packages/robiningelbrecht-phpunit-coverage-tools)[hot/phpunit-runner

The lib allows to watch phpunit tests

2867.1k4](/packages/hot-phpunit-runner)[shipmonk/phpunit-parallel-job-balancer

Balances PHPUnit test execution across parallel jobs based on JUnit XML timing data

102.4k](/packages/shipmonk-phpunit-parallel-job-balancer)

PHPackages © 2026

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