Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Pest Plugin Coverage

Pest Plugin Coverage Laravel Package

pestphp/pest-plugin-coverage

Official Pest plugin for code coverage: generate coverage reports from your Pest test suite, enforce minimum coverage thresholds, and integrate with PHPUnit coverage tooling through simple Pest commands and configuration.

View on GitHub
Deep Wiki
Context7

The Pest Coverage Plugin

Frequently asked questions about Pest Plugin Coverage
What is pestphp/pest-plugin-coverage used for?
It is the official Pest plugin for code coverage. It generates coverage reports from a Pest test suite, enforces minimum coverage thresholds, and wires into PHPUnit's coverage engine (Xdebug or PCOV) through Pest commands and configuration. It is strictly a require-dev, build-time and CI concern with no runtime production surface.
How do I install pestphp/pest-plugin-coverage?
Install it with composer require --dev pestphp/pest-plugin-coverage. Pest autodiscovers the plugin, so there is no service provider to register, and configuration lives in CLI flags plus phpunit.xml. Before adding it, check whether your Pest version already ships the coverage flags natively.
Is pestphp/pest-plugin-coverage still maintained?
No. The repository is archived, with 9 stars, 0 dependents, a composite score of 0.0825, and an opportunity score of 22.31. There is no PHP 8.3 or 8.4 tracking and no alignment with PHPUnit 10, 11, or 12, so treat its compatibility as frozen at the archive date.
Do I still need pest-plugin-coverage with modern Pest?
No. Pest 2.x and 3.x ship --coverage, --min, --coverage-clover, --coverage-html, and parallel-aware coverage natively. On a current major this plugin is dead weight that can actively conflict with core flags.
Which Pest and PHPUnit versions does pest-plugin-coverage support?
Its Composer constraints are frozen at the archive point, so verify them against your resolved lock with composer show pestphp/pest and composer show phpunit/phpunit. It does not track newer Pest majors or PHPUnit 10, 11, and 12. That frozen compatibility is usually the deciding factor for teams evaluating it.
How do I enforce a minimum coverage threshold with Pest?
Use the runner's built-in --min flag, for example vendor/bin/pest --coverage --min=80. The plugin exposed the same capability, but modern Pest handles it natively. Pair the gate with a Clover artifact so you can diff percentages between commits.
Why is my Pest coverage report empty or showing 0 percent?
Coverage tooling fails quietly: a missing driver yields an empty report, and a mistyped path can still produce a passing gate. Confirm a driver is present, preferring PCOV in CI, or set XDEBUG_MODE=coverage because Xdebug 3 does not collect coverage by default. Also verify the source and coverage blocks in phpunit.xml point at the right directories.
How do I migrate off pest-plugin-coverage?
Capture the current Clover artifact and --min threshold on a branch as your last known-good baseline. Remove the plugin and run vendor/bin/pest --coverage --coverage-clover build/coverage.xml --min=<threshold>. Require parity rather than approximation by diffing line, branch, and method percentages and file counts against the baseline, then update CI YAML and README references.
Does pest-plugin-coverage affect production runtime?
No. It belongs in require-dev and exists purely as a build-time and CI concern. It introduces no service provider, no production surface, and no data path, which is why its removal blast radius is effectively zero.
What are the best alternatives to pest-plugin-coverage?
Native Pest coverage flags are the direct replacement on Pest 2.x and 3.x. You can also invoke PHPUnit's coverage tooling directly against your Pest suite. Downstream services such as Codecov, Coveralls, or SonarQube can ingest the Clover or HTML artifacts your runner already produces.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core