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 |
Jump to:
Description
Instructions to run reporter:
- change index.php:
- add <?php require_once "phpcoverage.remote.top.inc.php"; to top
- require_once "phpcoverage.remote.bottom.inc.php"; to bottom
- change .htaccess file add to bottom:
- SetEnv PHPCOVERAGE_HOME /path/to/www/sites/all/modules/php_coverage/spikephpcoverage/src
- copy phpcoverage.remote.bottom.inc.php and phpcoverage.remote.top.inc.php from spikephpcoverage/src to web site root dir
- create reports dir in web site root writable by apache
- apply stcoverage.patch
- 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.
| Attachment | Size |
|---|---|
| stcoverage.patch | 1.32 KB |
| php_coverage.zip | 548.89 KB |

#1
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
fixing title.
#3
I'm moving this to a contributed module... stay tuned. :)