PHPackages                             sam-burns/behat-context-file-usage - 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. sam-burns/behat-context-file-usage

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

sam-burns/behat-context-file-usage
==================================

3.0.1(8y ago)12422MITPHP

Since Oct 19Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Sam-Burns/behat-context-file-usage)[ Packagist](https://packagist.org/packages/sam-burns/behat-context-file-usage)[ RSS](/packages/sam-burns-behat-context-file-usage/feed)WikiDiscussions master Synced 1mo ago

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

Behat Context File Usage
========================

[](#behat-context-file-usage)

What it's for
-------------

[](#what-its-for)

Produces an HTML code coverage report, showing you which parts of your Behat Context files are actually being used, and what can be deleted. Useful for the maintenance of larger suites.

Uses PHPUnit's coverage report generator.

How to install it
-----------------

[](#how-to-install-it)

Configure the extension in your `behat.yml` file, like this:

```
default:
    extensions:
        BehatContextFileUsage\Extension:
            context_folder: 'tests/behat/context-files/'
            report_folder:  'tests/behat/behat-code-usage-report/'
```

You can install it by putting this in your `composer.json` file:

```
"require": {
    "sam-burns/behat-context-file-usage": "*"
}
```

Now just run Behat as normal, with that config file.

Caveats
-------

[](#caveats)

It makes your test suite run slower, so maybe just use it now and again. Take the stuff back out of the `behat.yml` to turn it off.

It has not escaped the author's attention that the tool could be used to provide a PHPUnit-style code coverage report of your actual production code, with regards to Behat test coverage. This would be done by changing the `context_folder`setting to a value like `src/`. This is not a recommended approach with Behat.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 84.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 ~119 days

Recently: every ~179 days

Total

7

Last Release

3149d ago

Major Versions

0.1.0 → 1.0.02015-10-20

1.0.2 → 2.0.02015-10-30

2.1.0 → 3.0.12017-10-04

### Community

Maintainers

![](https://www.gravatar.com/avatar/9dc0c2d8bba727c2b30227f0e9eb327906ae55f4673bb48df1c846365e58d526?d=identicon)[Sam-Burns](/maintainers/Sam-Burns)

---

Top Contributors

[![Sam-Burns](https://avatars.githubusercontent.com/u/6594039?v=4)](https://github.com/Sam-Burns "Sam-Burns (11 commits)")[![sroze](https://avatars.githubusercontent.com/u/804625?v=4)](https://github.com/sroze "sroze (2 commits)")

### Embed Badge

![Health badge](/badges/sam-burns-behat-context-file-usage/health.svg)

```
[![Health](https://phpackages.com/badges/sam-burns-behat-context-file-usage/health.svg)](https://phpackages.com/packages/sam-burns-behat-context-file-usage)
```

###  Alternatives

[phpunit/phpunit

The PHP Unit Testing framework.

20.0k910.7M134.8k](/packages/phpunit-phpunit)[brianium/paratest

Parallel testing for PHP

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

All-in-one PHP Testing Framework

4.9k86.2M2.9k](/packages/codeception-codeception)[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)

PHPackages © 2026

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