Re: stop! .. time for unit tests

Arnaud Limbourg <arnaud-GdXxm9JVFPlWk0Htik3J/[email protected]> Tue, 23 Aug 2005 13:40:07 +0200
Newsgroups gmane.comp.php.pear.liveuser
Message-ID <[email protected]>
PHPUnit or SimpleTest might be the most appropriate tools.

SimpleTest has more documentation the PHPUnit at the moment by there is a lost
of documentation available for jUnit and the like that surely applies to php
unit tests.

If were to stay PEAR-focused it would either be phpt or phpunit :)

Arnaud.

> Hi,
>
> ok this last bug did it for me ..
> we should stop any feature enhancement efforts until we get the unit 
> testing stuff worked out.
>
> first we have to pick a tool kit.
>
> 1) phpt
>
> AFAIK it currently can only run tests on the shell, which kills 
> testing the session handling. though there is supposedly a patch to 
> allow testing inside a SAPI as well.
>
> Aside from this its fairly simple and requires little knowledge 
> beyond PHP itself once we have a few examples done. Also since its 
> just PHP code with a bunch of print statements is very easy to 
> integrate any user provided bug reproduce scripts.
>
> 2) PHPUnit(2)
>
> I am using PHPUnit for MDB2 based on the initial work  by Paul 
> Cooper. It seems to work alright.
>
> 3) SimpleTest
>
> I tried it out a while back and I even did some initial unit testing 
> for LiveUser once 
> (http://www.backendmedia.com/LiveUser/liveuser_test.zip). It also 
> seems to work alright. I just remember that I wanted to do something 
> simple and Marcus the lead developer insisted that I jump through 3 
> hoops to get it done.
>
> regards,
> Lukas
>
>
> _______________________________________________
> LiveUser mailing list
> [email protected]
> http://mailman.21st-hq.de/mailman/listinfo/liveuser
>