Home > Archive > PHP PEAR Questions and Answers > March 2005 > QA enhancements in PEAR 1.4
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
QA enhancements in PEAR 1.4
|
|
| Greg Beaver 2005-03-26, 3:56 pm |
| Hi,
I just wanted to let all you QA types know that PEAR 1.4.0a9 includes a
new option to the run-tests command that allows the running of all
installed .phpt tests in a package with
pear run-tests -p Packagename.
For instance, you can pear run-tests -p XML_Parser. If your system is
like mine, all of the tests will fail :), but it will locate and run them.
This will be invaluable for testing the first stable release of a
package that provides unit tests.
Greg
| |
| Lukas Smith 2005-03-26, 3:56 pm |
| Greg Beaver wrote:
> I just wanted to let all you QA types know that PEAR 1.4.0a9 includes a
> new option to the run-tests command that allows the running of all
> installed .phpt tests in a package with
>
> pear run-tests -p Packagename.
>
> For instance, you can pear run-tests -p XML_Parser. If your system is
> like mine, all of the tests will fail :), but it will locate and run them.
>
> This will be invaluable for testing the first stable release of a
> package that provides unit tests.
btw: i never spend any time on this, but maybe someone knows:
how hard would it be for me to also be able to run my phpunit tests this
way? .. i have a clitest.php to be able to run the tests form the shell.
regards,
Lukas
| |
| Greg Beaver 2005-03-27, 8:55 pm |
| Lukas Smith wrote:
> Greg Beaver wrote:
>
>
>
> btw: i never spend any time on this, but maybe someone knows:
> how hard would it be for me to also be able to run my phpunit tests this
> way? .. i have a clitest.php to be able to run the tests form the shell.
The best way to do this is for someone to take a look at
PEAR/Command/Package.php and grok the doRunTests() method.
What someone/you need to do is provide a class like PEAR/RunTest.php
that understands how to read PHPUnit files, runs the tests, and
retrieves the results of a test, and returns PASS FAIL or SKIP just like
RunTest.php.
Then, a simple option can be used to run those tests as PHPUnit tests.
First things first:
1) it is OK to decide that all packages with PHPUnit tests must provide
some config file that tells the tester which files to read from
2) anything else goes as long as the doRunTests() command can work with
minor modification
Greg
|
|
|
|
|