Code Comments
Programming Forum and web based access to our favorite programming groups.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
Post Follow-up to this messageGreg 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
Post Follow-up to this messageLukas 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
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.