PHPackages                             matthiasnoback/behat-local-code-coverage-extension - 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. matthiasnoback/behat-local-code-coverage-extension

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

matthiasnoback/behat-local-code-coverage-extension
==================================================

v0.5.0(5y ago)26486.8k↓40%102PHPPHP &gt;=7.0

Since Feb 7Pushed 4y ago2 watchersCompare

[ Source](https://github.com/matthiasnoback/behat-local-code-coverage-extension)[ Packagist](https://packagist.org/packages/matthiasnoback/behat-local-code-coverage-extension)[ RSS](/packages/matthiasnoback-behat-local-code-coverage-extension/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (2)Versions (8)Used By (2)

Behat local code coverage extension
===================================

[](#behat-local-code-coverage-extension)

This extension can be used to collect code coverage data when using Behat.

Install
=======

[](#install)

```
$ composer require --dev matthiasnoback/behat-local-code-coverage-extension

```

You'll also need Xdebug installed and enabled in your PHP installation (or Docker image) and also code coverage. Something like:

```
zend_extension=xdebug.so
xdebug.coverage_enable=1

```

Use
===

[](#use)

To use this extension, enable it under `extensions` and for every suite that needs local code coverage collection, set `local_coverage_enabled` to `true`.

```
default:
    extensions:
        BehatLocalCodeCoverage\LocalCodeCoverageExtension:
            target_directory: '%paths.base%/var/coverage'
    suites:
        default:
            local_coverage_enabled: true
```

After a test run, you'll find a `.cov` file in the target directory for every suite that has local code coverage enabled.

You can use these `.cov` files to generate nice reports, using [`phpcov`](https://github.com/sebastianbergmann/phpcov).

You could even configure PHPUnit to generate a `.cov` file in the same directory, so you can combine coverage data from PHPUnit and Behat in one report.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity45

Moderate usage in the ecosystem

Community22

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 52.9% 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 ~191 days

Recently: every ~211 days

Total

7

Last Release

1875d ago

PHP version history (2 changes)v0.1.0PHP ^7.0

v0.5.0PHP &gt;=7.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1193078?v=4)[Matthias Noback](/maintainers/matthiasnoback)[@matthiasnoback](https://github.com/matthiasnoback)

---

Top Contributors

[![matthiasnoback](https://avatars.githubusercontent.com/u/1193078?v=4)](https://github.com/matthiasnoback "matthiasnoback (9 commits)")[![fryght](https://avatars.githubusercontent.com/u/7307406?v=4)](https://github.com/fryght "fryght (2 commits)")[![webdevel](https://avatars.githubusercontent.com/u/1288852?v=4)](https://github.com/webdevel "webdevel (2 commits)")[![rmatil](https://avatars.githubusercontent.com/u/3106589?v=4)](https://github.com/rmatil "rmatil (1 commits)")[![magikid](https://avatars.githubusercontent.com/u/115515?v=4)](https://github.com/magikid "magikid (1 commits)")[![exussum12](https://avatars.githubusercontent.com/u/1102850?v=4)](https://github.com/exussum12 "exussum12 (1 commits)")[![cooperaj](https://avatars.githubusercontent.com/u/400210?v=4)](https://github.com/cooperaj "cooperaj (1 commits)")

### Embed Badge

![Health badge](/badges/matthiasnoback-behat-local-code-coverage-extension/health.svg)

```
[![Health](https://phpackages.com/badges/matthiasnoback-behat-local-code-coverage-extension/health.svg)](https://phpackages.com/packages/matthiasnoback-behat-local-code-coverage-extension)
```

###  Alternatives

[drupal/drupal-extension

Drupal extension for Behat

22215.1M147](/packages/drupal-drupal-extension)[friends-of-behat/symfony-extension

Integrates Behat with Symfony.

48223.4M551](/packages/friends-of-behat-symfony-extension)[friends-of-behat/variadic-extension

Variadic support for behat context arguments

2286.0M446](/packages/friends-of-behat-variadic-extension)[friends-of-behat/mink-extension

Mink extension for Behat

14034.2M467](/packages/friends-of-behat-mink-extension)[wp-cli/wp-cli-tests

WP-CLI testing framework

422.7M87](/packages/wp-cli-wp-cli-tests)[dmore/behat-chrome-extension

Behat extension for controlling Chrome without Selenium

3313.2M358](/packages/dmore-behat-chrome-extension)

PHPackages © 2026

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