Coverage reporter

Rok Žlender - April 28, 2008 - 18:23
Project:Drupal
Version:7.x-dev
Component:simpletest.module
Category:feature request
Priority:normal
Assigned:Unassigned
Status:won't fix
Description

Instructions to run reporter:

  1. change index.php:
    • add <?php require_once "phpcoverage.remote.top.inc.php"; to top
    • require_once "phpcoverage.remote.bottom.inc.php"; to bottom
  2. change .htaccess file add to bottom:
    • SetEnv PHPCOVERAGE_HOME /path/to/www/sites/all/modules/php_coverage/spikephpcoverage/src
  3. copy phpcoverage.remote.bottom.inc.php and phpcoverage.remote.top.inc.php from spikephpcoverage/src to web site root dir
  4. create reports dir in web site root writable by apache
  5. apply stcoverage.patch
  6. install and enable php_coverage module

This only works for functional web tests as it only records when index.php is hit. Unit tests can also be covered but I haven't found a way to use both at once.
This should be it.

AttachmentSize
stcoverage.patch1.32 KB
php_coverage.zip548.89 KB

#1

dlhubler - April 30, 2008 - 11:04
Title:Coverage reporter» Worth noting

that if you try to run coverage on all tests at once, phpcoverage chokes on the +500MB xml file. otherwise a single group of tests is fine.

#2

catch - April 30, 2008 - 11:08
Title:Worth noting» Coverage reporter

fixing title.

#3

cwgordon7 - June 27, 2008 - 01:07
Status:patch (code needs review)» won't fix

I'm moving this to a contributed module... stay tuned. :)

 
 

Drupal is a registered trademark of Dries Buytaert.