https://github.com/babeuloula/phpunit-coverage-checker
PHPUnit coverage checker
https://github.com/babeuloula/phpunit-coverage-checker
checker coverage phpunit threshold
Last synced: about 1 month ago
JSON representation
PHPUnit coverage checker
- Host: GitHub
- URL: https://github.com/babeuloula/phpunit-coverage-checker
- Owner: babeuloula
- License: mit
- Created: 2021-07-12T10:18:41.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-07-12T13:59:26.000Z (almost 4 years ago)
- Last Synced: 2025-02-13T19:18:04.466Z (3 months ago)
- Topics: checker, coverage, phpunit, threshold
- Language: PHP
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PHPUnit coverage checker
This script will read the XML coverage result and calculates the coverage score. Based on the given threshold the script
will exit(0) if the coverage is higher than the threshold or exit(1) if the coverage is lower than the threshold.## Installation
```bash
composer require --dev babeuloula/phpunit-coverage-checker
```## Usage
```bash
vendor/bin/coverage-checker
```Example:
```bash
./vendor/bin/phpunit --coverage-xml ./coverage
vendor/bin/coverage-checker coverage/xml/index.xml 80
```## Thanks
Thanks to [richardregeer][richardregeer] and [cylab.be][cylabbe].
[richardregeer]: https://github.com/richardregeer/phpunit-coverage-check
[cylabbe]: https://cylab.be/blog/114/fail-a-phpunit-test-if-coverage-goes-below-a-threshold