PHPUnit tests

bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2003-03-22 08:11

As some of you may have noticed, I've adopted PHPUnit as the unit testing framework for G2. At work we've started to use concepts from Extreme Programming and it's proven to be very effective and impressive. XP turns the standard software design model on its head and even after limited exposure to it (about a month and a half) I'm a convert. At work we're doing it to the hilt with pair programming and test driven design and though I can't do everything the XP way, it has influenced the way that I think about G2 and the approach that I'm taking.

So now I'm in the process of creating unit tests for as many aspects as possible of the code that I've already implemented. Currently there are 94 implemented tests with probably another 100 to go. If you're tracking G2 in CVS, you should try them out. Get a new copy of G2 and install it according to the README. The log in as an admin and browse to setup/phpunit/index.php. All tests should pass. If any of them don't pass, post the link to your phpunit here so that I can take a look. The plan is to accumulate hundreds of tests which will provide us with a sanity check when adding new features, porting to new platforms, supporting new databases, etc. We'll be able to actually *tell* if Gallery works on a new platform instead of just eyeballing it and taking a good guess :smile:

If you're interested in Extreme Programming, check out these links:
http://www.extremeprogramming.org/
http://www.xprogramming.com/xpmag/whatisxp.htm
http://www.google.com/search?q=extreme+programming

 
alindeman
alindeman's picture

Joined: 2002-10-06
Posts: 8194
Posted: Sat, 2003-03-22 12:27

All good here...

Gentoo Linux 1.4 (kernel 2.4.20), Apache 1.3.27, PHP 4.3.2-RC1, MySQL 3.23.56