Skip to content

babeuloula/phpunit-coverage-checker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

composer require --dev babeuloula/phpunit-coverage-checker

Usage

vendor/bin/coverage-checker <path/to/coverage/index.xml> <threshold>

Example:

./vendor/bin/phpunit --coverage-xml ./coverage
vendor/bin/coverage-checker coverage/xml/index.xml 80

Thanks

Thanks to richardregeer and cylab.be.