PHPackages                             nebulosar/codeception-coverage-checker - 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. nebulosar/codeception-coverage-checker

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

nebulosar/codeception-coverage-checker
======================================

Extension for codeception. Can be used to fail tests if they are under the coverage threshold

1.0.0(6y ago)24291[1 issues](https://github.com/Nebulosar/CodeceptionCoverageChecker/issues)MIT LicensePHPPHP &gt;=7.2.0

Since Aug 12Pushed 6y ago1 watchersCompare

[ Source](https://github.com/Nebulosar/CodeceptionCoverageChecker)[ Packagist](https://packagist.org/packages/nebulosar/codeception-coverage-checker)[ Docs](https://github.com/Nebulosar/CodeCeptCodeCov)[ RSS](/packages/nebulosar-codeception-coverage-checker/feed)WikiDiscussions master Synced 6d ago

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

Codeception Coverage Checker [![Build Status](https://camo.githubusercontent.com/497f347db06a92403b348662bdf70a59496dfdbcd880186bc1e4ab574c37bb8f/68747470733a2f2f7472617669732d63692e636f6d2f4e6562756c6f7361722f436f646563657074696f6e436f766572616765436865636b65722e7376673f746f6b656e3d6a5145553466397979417a55736a665537705135266272616e63683d6d6173746572)](https://travis-ci.com/Nebulosar/CodeceptionCoverageChecker)
==============================================================================================================================================================================================================================================================================================================================================================================================================================

[](#codeception-coverage-checker---)

Extension for codeception. Can be used to fail tests if they are under the coverage threshold.

What it does
------------

[](#what-it-does)

CoverageChecker is an extension made for Codeception. You can let your build fail when your code coverage is not high enough using this simple extension. If code coverage checks are the only thing you need from an analyser, this is what you want. No need for expensive cloud analysers!

**Example**
Take for example your build on Travis. By running your tests with codeception you can see if your code still works. Now, you can also check if there is enough code covered by those tests! This repository is a living example of that.

Install
-------

[](#install)

What you need:
**Codeception**
This is pretty obvious hence it is a Codeception extension. See Codeception for more info on [extensions](https://codeception.com/extensions)

**XDebug**
Used for generating the code coverage report. See the [XDebug download page](https://xdebug.org/download.php) to find your installation. If you are unsure which download you need, you could use the [XDebug wizard](https://xdebug.org/wizard.php) to find the right one.

To install using composer:

```
composer require nebulosar/codeception-coverage-checker --dev

```

Simple add the CoverageReporter to the *codeception.yml* file:

```
extensions:
  enabled:
    - Nebulosar\Codeception\CoverageChecker

```

Also make sure you enable the code coverage option of Codeception:

```
coverage:
  enabled: true
  check: lines

```

Usage
-----

[](#usage)

To use this extension you need to add the `--coverage` command line option when you run your tests. It works just the same as when you use codeception to generate a coverage report for you. Enabling the `coverage` tag in your *codeception.yml* file simply is not enough.

### Configuration options

[](#configuration-options)

All configuration for this plugin can be done under the `coverage` tag in your *codeception.yml* file. Here is an example of all the options. They are explained below.

```
coverage:
  enabled: true
  check:
    classes:
      low_limit: 65
      high_limit: 85
    methods:
      low_limit: 65
      high_limit: 85
    lines:
      low_limit: 65
      high_limit: 85

```

**Enabled**
This setting is a default Codeception setting which needs to be set to `true` when you want to use the coverage part of codeception. At this moment, CoverageChecker also listens to this setting to determine whether to check you coverage or not.

**Check**
This is the extension setting. When you add this attribute you have three types you can add: **classes**, **methods** and **lines**. This determines what you want to check. If you are only interested in line coverage you can simple use the line `check: lines` and the extension will work.

**Limit**Each type of check has two attributes you may set. These are the **low\_limit** and the **high\_limit**.

- When the code coverage is below the low limit, it will throw a `CodeCoverageException` and your build fails.
- When the code coverage is below the high limit, it will give you a warning.
- When the code coverage is above the high limit, it will give you a message that the coverage is above the limit and will be green. (success)

If you choose not to supply a limit, it will take the default which are 60% (low limit) and 80% (high limit).

### Command line options

[](#command-line-options)

**Coverage option**
The `--coverage` options is mandatory, but can also be replaced by any of the coverage options. Listed they are:

- `--coverage`
- `--coverage-xml`
- `--coverage-html`
- `--coverage-text`
- `--coverage-crap4j`
- `--coverage-phpunit`

**Colours**Some people like things flat and take console output very serious. Because of this, support is added for the `--no-colors` option. When using this option, output will be colourless.

Support
-------

[](#support)

When you find something that does not work like it should:
When you find something that can be improved:
When you think you are a neat open source programmer:

Help improve this extension for all! File an issue, the steps to reproduce and, if you can, open a pull request with the suggested fix!

License
-------

[](#license)

MIT
(see license page)

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity53

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

2470d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3999ec27906fa6f66bb8bfac31a8c79b034215ce71d58be87acb37c999c3ef9b?d=identicon)[Nebulosar](/maintainers/Nebulosar)

---

Top Contributors

[![Nebulosar](https://avatars.githubusercontent.com/u/19576680?v=4)](https://github.com/Nebulosar "Nebulosar (35 commits)")

---

Tags

checkcoveragecodeceptionextensioncode coveragecode checker

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/nebulosar-codeception-coverage-checker/health.svg)

```
[![Health](https://phpackages.com/badges/nebulosar-codeception-coverage-checker/health.svg)](https://phpackages.com/packages/nebulosar-codeception-coverage-checker)
```

###  Alternatives

[site5/phantoman

The Codeception extension for automatically starting and stopping PhantomJS when running tests.

481.1M17](/packages/site5-phantoman)[dvdoug/behat-code-coverage

Generate Code Coverage reports for Behat tests

593.6M37](/packages/dvdoug-behat-code-coverage)[mcustiel/phiremock-codeception-extension

Codeception extension for Phiremock. Allows to stub remote services for HTTP requests.

311.0M5](/packages/mcustiel-phiremock-codeception-extension)[friends-of-phpspec/phpspec-code-coverage

Generate Code Coverage reports for PhpSpec tests

202.6M125](/packages/friends-of-phpspec-phpspec-code-coverage)[leanphp/behat-code-coverage

Generate Code Coverage reports for Behat tests

50359.8k2](/packages/leanphp-behat-code-coverage)[mcustiel/codeception-http-mock

Extension for HTTP Mock.

1424.3k1](/packages/mcustiel-codeception-http-mock)

PHPackages © 2026

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