Re: What I love about CPAN and what I hope PEAR will be

From: Date: Mon, 23 Oct 2006 03:15:00 +0000
Subject: Re: What I love about CPAN and what I hope PEAR will be
References: 1 2 3 4 5 6 7  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-44716@lists.php.net to get a copy of this message
Lukas Kahwe Smith wrote: > Arnaud Limbourg wrote: >> Joshua Eichorn wrote: >>> Peter Beckman wrote: >>>> On Fri, 20 Oct 2006, Alister Bulman wrote: >>>> >>>>> On 20/10/06, Joshua Eichorn <josh@bluga.net> wrote: >>>>>> So whats your suggestion for PEAR, the only difference I see at >>>>>> all is >>>>>> build server for compiling on multiple distros (which might apply to >>>>>> pecl but doesn't apply to pear) >>>>>> -josh >>>>> I'd think the suggestion is: >>>>> >>>>> Automatically running unit tests, could get fancy like a Continuous >>>>> Integration system (that I would love to be able to run with code I'm >>>>> developing), or something a little simpler like running every X >>>>> hours/every time code is checked into the PEAR CVS repository - and it >>>>> just emails to the QA mailing list. >>>> Amen. Well put and yes, that's what I'm suggesting. I think the >>>> coding >>>> standards will need to standardize on something so that EVERY package >>>> has >>>> the tests in a standard way so that automating testing doesn't rely on >>>> hacks. >>> The installer has a run-tests command so im guessing the standized way >>> already exists, it just a matter of setting up some automated >>> testing. Seems like it would be pretty easy to >>> grab the code from the installer and do automatic testing of >>> releases. Then its just a matter of adding some reports and >>> formalizing the process. >>> >>> But again its the type of project that needs someone to take the first >>> steps on and get the ball rolling. >>> -josh >>> >> >> As a first step we need each project with unit tests to provide an >> AllTests.php that can be run with pear run-tests. >> >> On a related note that might be of interest is what the ZF guys did > > Yeah, the main challenge/question is how to unify all the different > configs, unit test frameworks etc used under a common enough interface > to make it possible to run automated tests. I guess that is what that > AllTests.php file is about? Packages that make use of .phpt files can take advantage of pear run-tests -p PackageName Packages that use PHPUnit or whatever else just need ot put an AllTests.php file somewhere in the package.xml that does all the necessary test setup and running, and then the run-tests command above works. The only problem, of course, is that automated running of tests is often impossible due to setup needs (initialize database and whatnot), so we'll need to keep this in mind. This is one reason .phpt tests are good, as SKIP can be used to ignore tests that require setup. This is possible with PhpUnit/Simpletest as well of course, but must be done manually. Greg

« previous php.pear.dev (#44716) next »