Download the PHP package vstelmakh/covelyzer without Composer
On this page you can find all versions of the php package vstelmakh/covelyzer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package covelyzer
Covelyzer
Covelyzer - PHP console tool to analyze PHPUnit test coverage report in clover (XML) format. Covelyzer integrates coverage metrics directly into the workflow forcing developers to write tests and forbidding delivery of uncovered code.
Highlights:
- Works in console
- Easy to integrate
- Flexible configuration
- Same setup locally and on CI
- Not depend on third-party service
Installation
Install the latest version with Composer:
Usage
Before you start, run tests with options to generate coverage report in XML format. See corresponding PHPUnit documentation reference Code coverage analysis and Covelyzer composer.json scripts section as an example.
Run tests with XML coverage xdebug example:
Run Covelyzer with default configuration:
To specify additional configuration see Configuration.
Configuration
Configuration defined in covelyzer.xml
located under project root (where vendor dir located). Or
configuration path could be overridden via -c | --config
command option:
If no configuration file provided - default configuration is used.
Example configuration:
<covelyzer>
element
Config root element.
timezone
attribute
Timezone should be used to display timestamp.
- use:
optional
- type:
string
(see: php timezones) - command option: could be defined/overridden via
--timezone
command option
<project>
element
Defines configuration for project coverage report. If defined project coverage report will be rendered.
- parent:
<covelyzer>
- use:
optional
minCoverage
attribute
Minimum coverage value. If project have less coverage - report will fail.
- use:
required
- type:
float
(min: 0, max: 100)
<class>
element
Defines configuration for class coverage report. If defined class coverage report will be rendered.
- parent:
<covelyzer>
- use:
optional
minCoverage
attribute
Minimum coverage value. If any class have less coverage - report will fail.
- use:
required
- type:
float
(min: 0, max: 100)
Tips & tricks
Use help option
Use -h | --help
command option to display Covelyzer help data. It contains all available arguments, options and usage examples.
Ignore code blocks
Covelyzer will analyze full report produced by PHPUnit. In some cases you want to ignore some code parts to not be taken into account. There are several options available, see Ignoring code blocks in PHPUnit documentation.
Speed up coverage with Xdebug
The performance of code coverage data collection with Xdebug can be improved by delegating whitelist filtering to Xdebug. See corresponding PHPUnit docs section: Speeding up code coverage with Xdebug.
Credits
Volodymyr Stelmakh
Licensed under the MIT License. See LICENSE for more information.
All versions of covelyzer with dependencies
ext-dom Version *
ext-libxml Version *
symfony/console Version ^3.2 || ^4 || ^5