This module allows you to determine code coverage using the xdebug code coverage framework.

Screenshot of code coverage results page

Installation

Due to the low-level entry point of code coverage the patch is hard-coded to point to sites/all/modules/code_coverage. The code_coverage module must be placed there in order to work unless you alter the patch accordingly.

In order to get code coverage working the code_coverage.patch will need to be applied to core.

Usage

After running tests though the UI, a code coverage link will be available for those tests.

The code coverage for an individual page can be viewed by appending ?code_coverage=true to url and clicking the link at the bottom of the page (may need to scroll).

Filter settings may be set to limit the extent of what is recorded during test runs and page runs at admin/config/development/code_coverage.

Issues

xdebug and php7 segfaults on 2.4.0 when attempting code coverage, you will need to upgrade to 2.4.1

xdebug 2.5.0 can segfault when running code coverage, use either 2.4.1 or 2.6-dev

Initial stable release after heavy development by ReviewDriven.

Project Information

Downloads