Symfony Continuous Integration

Continuous Integration. It is something that a lot of companies don't actively work on. It is very useful though. I am currently working on bringing CI to symfony in the form of phpUnderControl. This message is a short status update for those who already knew I was working on this.

A few evenings of work after starting on this project, I've got a working proof of concept since tonight. This working proof of concept means that I have phpUnderControl execute my tests, read in the resulting XML and display the test information in the phpUnderControl web interface as it would with phpUnit tests.

Structure

So how does this currently work. For this proof of concept, I've borrowed big pieces of code from the test:all task. I created a new task (test:undercontrol) which basically takes the output of test:all and analysis it for all required information. Based on this information, it builds an XML string that is then written to a path that is given as task parameter.

In your phpUnderControl, you create a new project as you always would. Instead of running phpUnit to test your code, you configure the build.xml to run

symfony test:undercontrol /path/to/cruisecontrol/projects/symfony/build/logs/phpunit.xml

Once phpUnderControl is triggered to build the project, it now gets all information it needs to display the test information in the web interface.

Not done though

This is just a proof of concept. With my work so far, I've proven that I can get symfony to spit out the required XML format so that phpUnderControl can parse and display this information. But this does not mean I'm done.

The test:all output is a summary of the actual test output, and as such does not contain all information that the XML needs. Right now, I added dummy information for those parts that I could not parse from the information I was getting. This will need to be rewritten so I can get more information from the tests and ensure that I get as much as possible the information required. And overall, the code needs a cleanup before I make it available to the general public.

Plugin

Once I do get this all cleaned up, I will be able to easily share it as a symfony plugin. This plugin, which currently goes by the working title of 'symfonyUnderControlPlugin', will contain the earlier mentioned test:undercontrol task, which is enough to get this working. Right now, I'm working on getting it to work with symfony 1.1, but with the imminent release of symfony 1.2, I will probably also start working on a symfony 1.2 version quickly after the 1.1 version is released. Backporting to 1.0 is also on my list, but with a lower priority.

Interested?

Interested in this plugin? I have so far been reporting my progress to the symfony-devs mailinglist, and will continue to do so. That mailinglist is quite interesting anyway, so if you do anything with symfony, join it anyway :)


Add comment

Comments

gravatar kbsali: VERY interested indeed!
Are you doing this with the phpUnit plugin? Or just with Lime?
I'm right now working on a project based on symfony 1.0 which is integrated in an existing structure of other projects NOT using symfony. These other projects are unit tested with phpUnit so for consistency i decided to use the phpUnit plugin for unit testing this symfony project too...
Also this is the only part of the system which is not nicely integrated in phpUnderControl... so again i am VERY interested! :)

Thanks!
October 20, 2008
gravatar kbsali: Got my answer by reading the mailing list : Lime it is!

Thanks!
October 20, 2008
gravatar Stingy: Great work, i like to see the plugin.
October 24, 2008
gravatar Pierre: Yes, please package it as a plugin! :lol:
October 30, 2008
gravatar phpleo: Great work,

I like to work together to support symfony 1.0.x, how can I help you?.

Greetings.
November 1, 2008
gravatar Tim: I have it all set up at the moment. I used the sgTest4CruisePlugin plugin to run all tests and create a xUnit .xml file which phpundercontrol can parse. It works really really.

I have also go ant checking all builds out of svn and running the tests.
November 26, 2008

Php5_zce_logo

not tested in IE


Upcoming events

I will be attending 17-04-2010: Pfcongres

Tags

1337 2008 2010 4developers accessibility AdaLovelaceDay09 advent agavi agile amsterdam apache apple article articles atk atkMetaNode audioscrobbler backwards compatibility barcelona bbc bbq beatstad belgium best practices bittorrent book books bughuntday caching cake cal evans cat cerf certificate cfp clear cms cologne common sense community conference conferences continuous integration crisis css custom datetime DbFinderPlugin decorator decorators deployment devdays development directoryindex documentation download dpc dpc09 DPC2008 dreamhost dv7 eclipse ed efficiency enterprise event events expertise ezcomponents facebook flickr framework frameworks freeze frontend fun games germany getting real google googletalk graceful degradation hack hackers hidden gem hiphop howto hp html http ibuildings icann ide imovie indy internet IPC ipc ipc08 javascript jobeet john peel joomla kubuntu left on the web lighttpd lime linux live london loudblog m2ts mac malware mambo marjolein meeting meme meta methodology microsoft movie music mysql namespace namespaces netbeans netherlands nllgg odmarco open source opinion ORM osx paradiso pavilion pear performance personal pfcongrez photo php phpabstract phpBB phpbb phpbelgium phpbenelux phpbnl10 phpgg phpitalia phpnw phpnw08 phptek phptek09 phpuk2009 phpUnderControl phpunit php|architect php|tek podcast politics portability postcrossing presentation presentations public qa recruiting refactoring review rewrite ruby on rails schedule script security seven things sfdaycgn simplexml slides smfony software sogeti solar sound standard standards static steer strings subversion symfony symfonycamp symfonyday symfonyUnderControlPlugin talk talks technology techportal tek09 telecommuting terratec terrorism testfest testing textpattern tips tld tomas unet usability usergroup validation vhost video vinyl virus warp weblogging wiki women work world world of warcraft writing xml xpath xsd yara year youtube ZCE zemanta zend zend framework zend server zend studio Zend_Form
© 2004 - 2010 Stefan Koopmanschap + Powered by Symfony, photos powered by Flickr, links powered by Delicious, Shanghai smilies by Iconbuffet. Feeds: rss / atom. Left on the Web v4.4.0.1