PHP UK Conference 2012

The journey towards Continuous Integration, by Sebastian Marek

24th February 2012

Over the past three years we've been pushing to improve our automated testing practices within Plusnet and to win full support for it within the company across the spectrum of fellow developers, project managers and upper management. It took a while to agree on software we want to use, and standards we want to follow, but now all new code is being continuously built and tested and the results of that are visible business-wide. We use PHP_CodeSniffer to verify that we follow our coding standards, DocBlox to generate automated API documentation, PHPUnit to run test suites and Jenkins to run all these tools regularly, at least once a day and to generate aggregated reports. On top of that we run acceptance and regression tests using selenium and Behat. Finally, Sonar allows us to create and publish reports visible to everybody and more importantly reports that everybody can understand.

Setting it all up can be a tough exercise, but if you prepare to it upfront you might actually find it quite exciting! So, you strongly believe this is the way you should be developing your code, but you don't really know where to start? Let me show you how our journey began. You don't know how to convince your fellow developers to follow you? I'll tell you how to establish a strong team that will follow you. Your managers seem to be more interested in delivering your project on time and don't really see a point in spending additional time on unit testing and documenting your code? Maybe you haven't shown them the benefits of continuous integration in a way they can understand.

I'll show you what worked for us.

Sebastian Marek is a software architect at PlusNet - a PHP developer, always seeking new experiences. He is experienced in medium and large web application, and interested in Web development, database designing and administering.