Writing an extension for SimpleTest

SimpleTest is hard-coded to be flexible and extensible. It means you can add your own assertions. You can also add your own reporter or any other tool worth your fancy. In fact there's a special directory inside SimpleTest SVN trunk devoted to such kind of experimentations.

Existing extensions

There's a growing list of available extensions:

provides an ANSI-colored {@link TextReporter} for viewing test results.
create a CSS Selector expectation.
provides an adapter for PEAR PHPUnit test case to allow legacy PEAR test cases to be used with SimpleTest.
provides an adapter for sourceforge PHPUnit test case to allow legacy test cases to be used with SimpleTest.
returns an array with timestamp, status, test name and message for each pass and failure.
integrates selenese html test suite support (can be generated by selenium-IDE).
provides a bridge to a Selenium server.
constructs and renders a treemap visualization of a test run.

Committing a new extension

If you want to have your own extension accepted inside the SVN trunk, juste make sure you follow these simple rules:

  1. Main code goes into a file located at
  2. If you need extra stuff (classes, sub-routines, js or css files), make sure everything is located your own
  3. And since your package is unit-tested, your tests go into
  4. Bonus : you can get your own test suite caught directly from SimpleTest. There's dedicated test scanning recursively the extensions' directories and running the test file matching /test.php$/. An easy way for us to check if everyone's extension carries on working with the current code base...
Also for general coding practices, you can have a look at the
coding standards and formatting.