[wp-hackers] wordpress-tests: test automation for WP

Alex Shiels alex at automattic.com
Thu Sep 20 12:02:47 GMT 2007


Hi,

Those interested in unit testing testing might want to take at 
wordpress-tests, a test automation engine for Wordpress:

	http://svn.automattic.com/wordpress-tests

Though it can be used for unit testing, strictly speaking it's an 
automated regression test system.  Tests are run against a (more or 
less) fully functioning, freshly installed copy of Wordpress or 
Wordpress-mu, database and all (as opposed to the mock object unit 
testing approach taken by Jacob Santos).

The test cases so far (in wp-testcase) are fairly sparse, but should 
give an indication of what's possible.  They all pass against the 
current wordpress trunk.

Basic docs are in the README.  Please read the warnings carefully and 
keep it well separated from production data - this will nuke your database.

Currently it uses PHPUnit 3, from phpunit.de, though it's designed to be 
fairly independent of the unit test framework (it can run on PHPUnit 1 
with minor hacking).

I haven't tried yet, but with a bit of tinkering it can probably run 
Jacob's tests also.

Cheers,
Alex.

-- 
Alex Shiels
http://flightpath.wordpress.com/


More information about the wp-hackers mailing list