Chapter 12. Continuous Integration

Manuel Pichler and Sebastian Nohn

WHAT'S IN THIS CHAPTER?

  • Configuring continuous integration

  • Automating build processes

  • Using version management

  • Refactoring code clones

  • Gathering information with software metrics

  • Detecting security issues with RATS

  • Installing CruiseControl and phpUnderControl

  • Configuring CruiseControl

  • Implementing continuous deployment

INTRODUCTION

After the success of dynamic testing techniques (such as unit testing), static testing techniques (such as static code analysis) and continuous integration are getting more attention in the PHP world.

Static code analysis belongs to the family of static testing techniques. In contrast to the dynamic testing techniques discussed in Chapter 2, these static techniques perform their tests without actually executing the code. Static analysis looks at its test object—the code—and evaluates it with regard to formal quality criteria such as correct code formatting or the absence of code duplication. Furthermore, simple metrics such as the number of executable lines of code and more complex metrics such as Cyclomatic Complexity and code rank are calculated to provide key indicators about the code. Because a complete automation of these checks is not only possible but also easy, static testing techniques can be used to prove the absence of errors, whereas dynamic testing techniques can only show the presence of errors. Impeccable code is a requirement for high-quality software. Static analysis facilitates ...

Get Real-World Solutions for Developing High-Quality PHP Frameworks and Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.