How to run the WACT Test Suite

It is best to run the test suite on the SVN version of WACT. See How to get WACT via SVN.

You will need SimpleTest 1.0 or better.

To run coverage reports, you will need Spike PHPCoverage and XDebug.

Add the following to the stripCoverageData method at line 331 in CoverageRecorder.php to work around a bug in version 0.65 of Spike PHPCoverage:

// eliminate data with no actual supporting file.
if (preg_match('/(: eval\(\)\'d code|: regexp code|: runtime-created function)$/', $filename)) {
   $preserve = FALSE;
}

You may also need to install the following PEAR modules in order to get some of the tests to work:

In order to run the examples tests, you will have to run setup.sh to set the proper directory permissions. Additionally, you will need to create a compiled directory inside tests/cases/web_tests/errors/templates with 0777 permissions. (The setup script does not setup the tests.)

Troubleshooting

If you are getting 0% in your code coverage reports, make sure you’ve loaded the xdebug extension as a zend extension (zend_extension=xdebug.so) and see this thread, especially this message.