https://github.com/g4code/code-coverage
php command line tool for analysing phpunit xml code coverage report
https://github.com/g4code/code-coverage
Last synced: 3 months ago
JSON representation
php command line tool for analysing phpunit xml code coverage report
- Host: GitHub
- URL: https://github.com/g4code/code-coverage
- Owner: g4code
- Created: 2017-10-19T12:37:10.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-02-21T08:54:27.000Z (over 2 years ago)
- Last Synced: 2025-10-20T22:45:33.898Z (9 months ago)
- Language: PHP
- Homepage:
- Size: 44.9 KB
- Stars: 1
- Watchers: 7
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
code-coverage
======
> code-coverage - [php](http://php.net) command line tool for analysing [phpunit](https://phpunit.de) xml code coverage report
## Install
Via Composer
```sh
composer require g4/code-coverage
```
## Usage
Before running code-coverage, run phpunit with --coverage-clover option to generate code-coverage xml file
```sh
./vendor/bin/phpunit --coverage-clover=path/to/code-coverage.xml
```
```sh
usage: code-coverage []
Analyze phpunit coverage report.
OPTIONS
--file, -f Path to phpunit's code coverage xml report
--help, -? Display this help.
--percentage, -p Minimum coverage percentage to be considered "highly"
covered.
e.g.
./vendor/bin/code-coverage -p 90 -f path/to/code-coverage.xml
output:
Required: 90.00%
Methods: 91.43%
Statements: 95.58%
Elements: 94.59%
```
## Development
### Install dependencies
$ composer install
### Run tests
$ composer unit-test
## License
(The MIT License)
see LICENSE file for details...