Re: Re: Code Testing

From: Date: Fri, 04 Feb 2005 22:43:03 +0000
Subject: Re: Re: Code Testing
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-17394@lists.php.net to get a copy of this message
Andrew Nagy wrote:
Michael Caplan wrote:
I am currently in the process of figuring out the best method for testing PHP libraries, and (as per usual when it comes to best coding practices) I turn to see what the PEAR folks are doing in this area. The testing applications that I have been looking into includes PEAR's PHPUnit, Simple Test, and the .phpt method (which I don't know what to call).
I think he was asking for the name of .phpt
The method is generally referred to as "Unit Testing". The premise is to test individual classes or modules of a larger system to see if their processes are "calculating" the correct answer as well as to see any regressions by testing multiple classes at once. I was
surprised to see that of the several PEAR packages I looked at there is no standard amongst them (or at least their appears that their is not). Is this something that is in the fold for PEAR, or does PEAR have no preference to testing? I assume that PEAR is concerned about providing a consisting manner for testing packages (with the new QA group). Considering that much of my work these days draws heavily from PEAR, I would like to implement a test method that works well with PEAR packages as well.
Here are some definitions: http://en.wikipedia.org/wiki/Unit_test http://c2.com/cgi/wiki?UnitTest My suggestion is to use PHPUnit as your testing framework as that is the standard for PEAR packages. I think his point was that its not so standard a quick look on one of my installs shows more phpt files then anything else.
-josh
Cheers and Go EAGLES! Andrew


« previous php.pear.general (#17394) next »