Continuous Integration for PHP — phpUnderControl & CruiseControl

Did you know that you can auto­mate unit tests (which is the PHP worlds equalient of com­pi­la­tion checks :-) ).

Set up your devel­op­ment team using local check­outs of the project and have them do local PHPUnit tests, check their changes in and then get Con­tin­u­ous Inte­gra­tion checks done on a cen­tral server using phpUn­der­Con­trol that emails the team with success/fail reports, it’s a good way to work.

phpUn­der­Con­trol is an addon appli­ca­tion for the con­tin­u­ous inte­gra­tion tool CruiseC­on­trol, which inte­grates some of the best PHP devel­op­ment tools. This project aims to make your first steps with CruiseC­on­trol and PHP as easy as pos­si­ble. There­fore phpUn­der­Con­trol comes with a com­mand line tool that per­forms all mod­i­fi­ca­tions to an exist­ing CruiseC­on­trol installation.

Inte­grated tools

  • Test­ing and soft­ware met­rics – PHPUnit is the most pop­u­lar xUnit imple­men­ta­tion for PHP that pro­vides a frame­work for auto­mated soft­ware tests. Except the pure test automa­tion PHPUnit con­tains a rich set of fea­tures like Code Cov­er­age, Project Mess Detec­tion and Soft­ware Met­rics. To visu­al­ize the gen­er­ated XML reports phpUn­der­Con­trol comes with a set of XSL stylesheets that pre­pare the out­put for CruiseControl.
  • Doc­u­men­ta­tion – phpUn­der­Con­trol uses the most com­mon doc­u­men­ta­tion tool for PHP projects, Php­Doc­u­men­tor, to gen­er­ate an up to date doc­u­men­ta­tion of the soft­ware on every build cycle. There­fore the devel­op­ers will always get the lat­est API doc­u­men­ta­tion of their project. Addi­tion­ally phpUn­der­Con­trol extracts the doc­u­men­ta­tion vio­la­tions found by the Php­Doc­u­men­tor and visu­al­izes these as an addi­tional qual­ity report in the user inter­face and the project time line of doc­u­men­ta­tion violations.
  • Cod­ing Stan­dards – With the pack­age PHP_CodeSniffer the PEAR project gave PHP devel­op­ers a very use­ful tool to detect cod­ing stan­dard vio­la­tions in a project. Since ver­sion 1.0.0RC3 it has native sup­port for the Check­style XML for­mat that can be visu­al­ized by CruiseC­on­trol. PHP_CodeSniffer comes with a vari­ety of pre defined cod­ing stan­dards like PEAR and ZEND but due to its mod­u­lar struc­ture you can eas­ily imple­ment a cus­tom rule set or extend one of the pre defined sets. This devel­op­ment tool assures that the whole project code will remain clean and consistent.

Go and check it out today :)

Tags: , , , , , ,

Leave a Comment

*

Get Adobe Flash playerPlugin by wpburn.com wordpress themes