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.

Comments

moshe weitzman’s picture

Looks nice. Uses xdebug for the heavy lifting. Thats good.

cwgordon7’s picture

StatusFileSize
new1.9 KB

Coding standards.

**hangs head in shame**. SHAME!!!

Rok Žlender’s picture

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.

cwgordon7’s picture

Oh that would be completely AWESOME! Complete +1!

Rok Žlender’s picture

StatusFileSize
new607.97 KB
new1.28 KB

Ok code for new hook as a patch and new module that includes phpcoverage as a tar ball

boombatower’s picture

Status: Needs review » Closed (duplicate)