Re: Multiple Unit Test formats in PEAR, a solution?
| From: | Davey Shafik | Date: | Mon, 10 Oct 2005 02:55:33 +0000 |
| Subject: | Re: Multiple Unit Test formats in PEAR, a solution? | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-40119@lists.php.net to get a copy of this message | ||
Greg Beaver wrote:
Davey Shafik wrote:Quite right :)Hey PEARs, I would like to run an idea up the flagpole that I just had :) It seems that there is no mandated test format in PEAR, and there are two main camps, PHPUnit (fitting as PHPUnit(2) is in PEAR) and .phpt (which work with pear run-tests). There is also SimpleTest, which I know some people use. I think it would be great to add a <tester> tag to the new package2.xml, which would be a script to run the tests, effectively a replacement for "runTests.php".Far better than a new tag is a new custom file role. The infrastructure is already in place to extend PEAR in this manner. Of course, this is only necessary for packages that make use of simpletest or PHPUnit.
However, even better than this would be if Sebastian would define a required format for organizing PHPUnit-based tests in PEAR, or at least a standard file that can be used to parse out tests to be run. This would simply make it possible to simply extend the existing run-tests command to work with that format. I dislike the idea of requiring a custom script for each package, this is only going to create confusing bugs (is this a bug in PEAR, or in my testing script or in PHPUnit?).Good point, I think you are right :) - Davey