Allow for determining testing coverage
| Project: | SimpleTest |
| Version: | 7.x-1.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | duplicate |
The attached patch allows for integration with the spikephpcoverage framework. Basically, it checks to see if a subdirectory of the simpletest module "spikephpcoverage" exists, and if it does, starts it up, and has it generate a report on which lines of code were called (and which were not) during the test. Requires the spikephpcoverage package from http://developer.spikesource.com/wiki/index.php/Projects:phpcoverage to be installed and set up properly.
I was not able to run all tests locally without apache crashing, but a sample of the report generated by a single test can be found at http://cwgordon.com/simpletest/coverage_example/details/index.html.
There should be no effect upon anyone not attempting to determine the test coverage.
| Attachment | Size |
|---|---|
| simpletest_coverage.patch | 1.77 KB |

#1
Looks nice. Uses xdebug for the heavy lifting. Thats good.
#2
Coding standards.
**hangs head in shame**. SHAME!!!
#3
What if we create a ST hook that would be run before test starts and after with run and stop params. This way we could move stuff like this which is not needed for regular tests into a diff module. This module can still be included with simpletest.
#4
Oh that would be completely AWESOME! Complete +1!
#5
Ok code for new hook as a patch and new module that includes phpcoverage as a tar ball
#6
http://drupal.org/node/252292