Code Coverage Tools for PHP

Code Coverage tools for PHP

xdebug has Code Coverage Analysis.

Check this chapter of the PHPUnit Manual

Is there a code coverage tool that works with manual testing?

Sheldon,

Have you heard of Xdebug? I'm using this and it is fantasic! I'm using Ubuntu 8.04 and it is available via the package repository (apt-get).

It is free and it has basic code coverage analysis functionalities:

http://xdebug.org/docs/code_coverage

For your information, profiling is also available:

xdebug.org/docs/profiler

(This should be a hyperlink!!! It only allows me to post one hyperlink per answer because I'm a new user... sigh...)

Hope this helps!

Kenji

PHP code coverage and Selenium

Just add an auto-prepend script which calls xdebug_start_code_coverage() and registers a shutdown function which logs the output of xdebug_get_code_coverage()

Then analyse your data later.

PHP code coverage with non-unit tests

This blog post raises the question of what value codecoverage might be when running Behat tests

The nature of acceptance tests is not really to tests units of code, but to assure that the behavior of your application meets a certain set of criteria (Behat Scenarios).

as does this blog post

There is generally no point in having code coverage for Behat test cases because of their nature: The purpose of an acceptance test is to assert a certain behavior of an application, not to technically test a piece of code. Therefore, there is no point in checking for uncovered code pieces in order to write a Behat test for it.

However, Codeception does, and Behat can do so with the vipsoft extension



Related Topics



Leave a reply



Submit