For any software developer who has spent days in “integration hell,” cobbling together myriad software components, Continuous Integration: Improving Software Quality and Reducing Riskillustrates how to transform integration from a necessary evil into an everyday part of the development process. The key, as the authors show, is to integrate regularly and often using continuous integration (CI) practices and techniques. The authors first examine the concept of CI and its practices from the ground up and then move on to explore other effective processes performed by CI systems, such as database integration, testing, inspection, deployment, and feedback. Through more than forty CI-related practices using application examples in different languages, readers learn that CI leads to more rapid software development, produces deployable software at every step in the development lifecycle, and reduces the time between defect introduction and detection, saving time and lowering costs. With successful implementation of CI, developers reduce risks and repetitive manual processes, and teams receive better project visibility. The book covers How to make integration a “non-event” on your software development projects How to reduce the amount of repetitive processes you perform when building your software Practices and techniques for using CI effectively with your teams Reducing the risks of late defect discovery, low-quality software, lack of visibility, and lack of deployable software Assessments of different CI servers and related tools on the market The book’s companion Web site,www.integratebutton.com, provides updates and code examples.
Table Of Content:
Foreword by Martin Fowler xiiiForeword by Paul Julius xvPreface xixAbout the Authors xxxiAbout the Contributors xxxiiiPart I: A Background on CI: Principles and Practices 1Chapter 1: Getting Started 3Build Software at Every Change 4Features of CI 12Summary 20Questions 20 Chapter 2: Introducing Continuous Integration 23A Day in the Life of CI 25What Is the Value of CI? 29What Prevents Teams from Using CI? 32How Do I Get to Continuous Integration? 33When and How Should a Project Implement CI? 35The Evolution of Integration 36How Does CI Complement Other Development Practices? 37How Long Does CI Take to Set Up? 38CI and You 39Commit Code Frequently 39Don't Commit Broken Code 41Fix Broken Builds Immediately 41Write Automated Developer Tests 41All Tests and Inspections Must Pass 42Run Private Builds 42Avoid Getting Broken Code 43Summary 44Questions 44 Chapter 3: Reducing Risks Using CI 47Risk: Lack of Deployable Software 49Risk: Late Discovery of Defects 53Risk: Lack of Project Visibility 55Risk: Low-Quality Software 57Summary 62Questions 62 Chapter 4: Building Software at Every Change 65Automate Builds 67Perform Single Command Builds 69Separate Build Scripts from Your IDE 73Centralize Software Assets 74Create a Consistent Directory Structure 75Fail Builds Fast 76Build for Any Environment 77Build Types and Mechanisms 78Use a Dedicated Integration Build Machine 81Use a CI Server 85Run Manual Integration Builds 86Run Fast Builds 87Stage Builds 92How Will This Work for You? 96Summary 101Questions 102 Part II: Creating a Full-Featured CI System 105Chapter 5: Continuous Database Integration 107Automate Database Integration 110Use a Local Database Sandbox 117Use a Version Control Repository to Share Database Assets 119Continuous Database Integration 121Give Developers the Capability to Modify the Database 123The Team Focuses Together on Fixing Broken Builds 124Make the DBA Part of the Development Team 124Database Integration and the Integrate Button 125Summary 126Questions 128 Chapter 6: Continuous Testing 129Automate Unit Tests 132Automate Component Tests 134Automate System Tests 136Automate Functional Tests 137Categorize Developer Tests 138Run Faster Tests First 141Write Tests for Defects 143Make Component Tests Repeatable 148Limit Test Cases to One Assert 156Summary 158Questions 159 Chapter 7: Continuous Inspection 161What Is the Difference between Inspection and Testing? 164How Often Should You Run Inspectors? 165Code Metrics: A History 166Reduce Code Complexity 167Perform Design Reviews Continuously 170Maintain Organizational Standards with Code Audits 173Reduce Duplicate Code 176Assess Code Coverage 180Evaluate Code Quality Continuously 182Summary 185Questions 186 Chapter 8: Continuous Deployment 189Release Working Software Any Time