Moin,

On Tuesday 28 March 2006 16:11, Geoffrey Young wrote:
> hi all :)
>
> for those interested in both php and perl, it seems that php's native
> .phpt testing feature will soon produce TAP compliant output - see greg
> beaver's comments here
>
>   http://shiflett.org/archive/218#comments
>
> so, TAP is slowly dominating the world... but we all knew that already
> :)
>
> what actually prompted me to write is a comment embedded there:
>
> "Only the simplest of designs benefits from pre-coded tests, unless you
> have unlimited developer time."

I am not sure if that proves it or not (need coffee before that), but you 
might look at the huge testsuite for the (moderately complex) Graph::Easy 
with at least 300 "pre-coded" tests in ascii.t alone:

        http://search.cpan.org/src/TELS/Graph-Easy-0.43/t/

Creating these tests takes quite a time, but then, to find a bug you have 
to have a clear testcase first anyway. And once you have it (breaks with 
old code, works with new code), you can just move it into the t/in/ 
directory, create the expected output in t/out/ and increment the counter 
in ascii.t and be done with it.

The hard part is of course that all these tests should have been there 
from revision 0.01 on already (except the ones testing newly implemented 
features, but then the testsuite is still far from complete anyway)

The one thing that absolutely does _not_ work is creating the output and 
inspecting it visually. Nobody will be able to view and inspect a few 
thousand testcases each revision - I did about fourty in one year for 
Graph::Easy alone.

Hope this helps,

Tels

-- 
 Signed on Tue Mar 28 19:14:13 2006 with key 0x93B84C15.
 Visit my photo gallery at http://bloodgate.com/photos/
 PGP key on http://bloodgate.com/tels.asc or per email.

 "Now, _you_ behave!"

Attachment: pgpsTG8H8TgUG.pgp
Description: PGP signature

Reply via email to