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 speaking 08-10-2010: Symfony Day Cologne 2010
I will be speaking 09-10-2010: Symfony workshop

Tags

1337 2008 2010 4developers access modifiers accessibility AdaLovelaceDay09 advent agavi agile amsterdam apache apple article articles atk atkMetaNode audioscrobbler azure backwards compatibility barcelona bbc bbq beatstad belgium best practices bittorrent boards of canada book books bughuntday caching cake cal evans career cat cerf certificate cfp clear cms cologne common sense communities community conference conferences continuous integration contribute crisis css custom datetime DbFinderPlugin decorator decorators deployment devdays development directoryindex documentation download dpc dpc09 dpc10 DPC2008 dreamhost dv7 eclipse ed efficiency enterprise errors event events expertise ezcomponents facebook flickr framework frameworks freelance freeze frontend fun games germany getting real google googletalk graceful degradation hack hackers hidden gem hiphop howto hp html http ibuildings icann ide idm imovie indy ingewikkeld internet IPC ipc ipc08 javascript job jobeet john peel joomla kubuntu left on the web lighttpd lime linux live london loudblog m2ts mac malware mambo marjolein mediterra meeting meme meta methodology microsoft movie music mysql namespace namespaces netbeans netherlands nllgg odmarco open source opinion ORM osx paradiso pavilion pear performance personal pfc10 pfcongres pfcongrez photo php phpabstract phpazure phpBB phpbb phpbelgium phpbenelux phpbnl10 phpgg phpitalia phpnw phpnw08 phptek phptek09 phpuk2009 phpUnderControl phpunit php|architect php|tek podcast politics portability postcrossing presentation presentations private projects protected public qa recruiting refactoring review rewrite ruby on rails schedule scifi script security seven things sfdaycgn simplexml slides smfony software sogeti solar sound standard standards star trek static steer strings subversion symfony Symfony2 symfonycamp symfonyday symfonyUnderControlPlugin talk talks technology techportal tek09 telecommuting terratec terrorism testfest testing textpattern tips tld tomas training twig uncon unet usability usergroup validation vhost video vinyl virus warp weblogging wiki windows winphp women work workshop world world of warcraft wpi 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