Download the PHP package leanphp/behat-code-coverage without Composer
On this page you can find all versions of the php package leanphp/behat-code-coverage. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package behat-code-coverage
behat-code-coverage
behat-code-coverage is a Behat extension that generates Code Coverage reports for Behat tests.
Generating Code Coverage reports allows you to to analyze which parts of your codebase are tested and how well. However, Code Coverage alone should NOT be used as a single metric defining how good your tests are.
Note! This is a maintained fork of vipsoft/code-coverage-extension, including codebase for vipsoft/code-coverage-common package with compatible version numbers for stable releases.
Requirements
Change Log
Please see CHANGELOG.md for information on recent changes.
Install
Install this package as a development dependency in your project:
$ composer require --dev leanphp/behat-code-coverage
Enable extension by editing behat.yml
of your project:
This will sufficient to enable Code Coverage generation in html
format in
build/behat-coverage
directory. This extension supports various
Configuration options. For a fully annotated example
configuration file check Configuration section.
Usage
If you execute bin/behat
command, you will see code coverage generated in
target
(i.e. build/behat-coverage
) directory (in html
format):
$ bin/behat
Running with phpdbg
This extension now supports phpdbg, which results in faster execution when
using more recent versions of PHP. Run phpspec
via phpdbg:
$ phpdbg -qrr bin/behat run
Configuration
You can see fully annotated behat.yml
example file below, which can be used
as a starting point to further customize the defaults of the extension. The
configuration file below has all of the Configuration Options.
Configuration Options
auth
- HTTP authentication options (optional).create
(method
/path
) - override options for create method:method
- specify a method (default:POST
)path
- specify path (default:/
)
read
(method
/path
) - override options (method and path) for read method.method
- specify a method (default:GET
)path
- specify path (default:/
)
delete
(method
/path
) - override options (method and path) for delete method.method
- specify a method (default:DELETE
)path
- specify path (default:/
)
drivers
- a list of drivers for gathering code coverage data:local
- local Xdebug driver (default).remote
- remote Xdebug driver (disabled by default).
filter
- various filter options:forceCoversAnnotation
- (default:false
)mapTestClassNameToCoveredClassName
- (default:false
)whiltelist
- whitelist specific options:addUncoveredFilesFromWhiltelist
- (default:true
)processUncoveredFilesFromWhitelist
- (default:false
)include
- a list of files or directories to include in whitelist:directories
- key containing whitelisted directories to include.suffix
- suffix for files to be included (default:'.php'
)prefix
- prefix of files to be included (default:''
) (optional)
files
- a list containing whitelisted files to include.
exclude
- a list of files or directories to exclude from whitelist:directories
- key containing whitelisted directories to exclude.suffix
- suffix for files to be included (default:'.php'
)prefix
- prefix of files to be included (default:''
) (optional)
files
- key containing whitelisted files to exclude.
report
- reporter options:format
- specify report format (html
,clover
,php
,text
)options
- format options:target
- target/output directory
Authors
Copyright (c) 2017 ek9 https://ek9.co).
Copyright (c) 2013-2016 Anthon Pang, Konstantin Kudryashov everzet and various contributors for portions of code from vipsoft/code-coverage-extension and vipsoft/code-coverage-common projects.
License
Licensed under BSD-2-Clause License.
All versions of behat-code-coverage with dependencies
phpunit/php-code-coverage Version ^6.0
behat/behat Version ^3.0
guzzlehttp/guzzle Version ^6.0
symfony/config Version ^2.3||^3.0||^4.0
symfony/dependency-injection Version ^2.2||^3.0||^4.0
symfony/expression-language Version ^2.2||^3.0||^4.0
symfony/http-kernel Version ^2.3||^3.0||^4.0
symfony/http-foundation Version ^2.3||^3.0||^4.0