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
Implementing continuous deployment
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 ...