The final judge of any software’s quality is in the eyes of the customer based on three fundamental measures:
- The software’s functionality, performance, usability and so on meet or exceed requirements
- The software is as nearly defect-free as humanly possible
- The software is delivered on time and within budget
Given that the development organization’s planning processes, tools and talent are in good order, one of the key ingredients in producing quality software is the use of agile development methodologies that include continuous development practices, especially continuous integration.
Two Software Development Realities
If original software requirements were correct and unchanging, the jobs of developers and testers would be relatively straightforward. Additionally, if developers were able to write defect-free code from those requirements, the risk of missing delivery deadlines would be greatly reduced. However, the probability of either of those conditions being true is extremely low.
In part, agile methodologies address these realities by embracing the tendency of customers to modify requirements and accommodating inevitable coding defects. These notions are behind the short development cycles – scrums or sprints – that characterize agile development processes. Integral to the process is the idea of continuous integration.
Continuous Integration’s Benefits to Software Quality
With regard to coding defects, it is generally agreed that the earlier defects are detected the easier they are to correct. This is due to two factors. First, defects are eliminated more efficiently by developers if the code in question is still fresh in the mind of the developer. Secondly, the sooner a defect is corrected the less chance other code has to become dependent on that defect, which would increase the effort to debug and correct it.
There can be defects in the requirements themselves, which propagate throughout the software the further development proceeds. More commonly, however, “defects” related to requirements occur because the requirements change and invalidate existing work.
Both of these situations are addressed by unit testing and integrating new code, building the entire software package such as it is and applying regression tests within short time periods. Instead of a frequency of weeks or months as is common in waterfall methodologies, continuous integrations dictates that the entire process be accomplished in less than a day, every day. In the case of a globally dispersed team, the frequency should be higher to avoid regional sub-teams waiting for fixes to defects introduced by teams in other time zones.
Removing Barriers to Continuous Integration in the Enterprise
Adopting continuous integration practices across the enterprise can go a long way toward improving the quality of its software along all three dimensions listed at the beginning of this article. To take full advantage of its benefits, however, the enterprise must focus on removing barriers to its adoption and implementation:
- The integration process must be flexible enough to incorporate more than code changes. It must accommodate modifications to the development and test environments, production test data, third-party libraries, OS patches and hardware under test.
- CI procedures, tools and servers do not necessarily require centralization, but they should be homogenized across the organization for the sake of efficiency in tracking and reporting.
- Because of the high frequency of integrations, effort must be applied to increasing test automation and parallelization of build/test execution either via additional servers or the use of VMs. A complete built/test cycle should finish in under 30 minutes to be most effective.
- The tendency of code, test scripts, test libraries and other tools to diverge over time or regions must be countered to reduce complexity and increase sharing. This is accomplished by everyone working from a single mainline within version control with no branching. This is the only way to ensure one of CI’s biggest advantages: stability.
- As per agile methodology, removing human barriers to a smooth execution of CI requires discarding strict matrices of responsibility within and between development and test teams. In this way, bottlenecks created by experts and “owners” of process steps are disposed of.
- Special attention must be paid to enabling CI infrastructure, processes and personnel to scale as projects grow in complexity or become increasingly dispersed in time and space.
Continuous integration, especially as part of an encompassing agile methodology, provides distinct improvements to the quality of software produced by any enterprise. It improves development and test team efficiency in detecting and repairing software defects, while boosting responsiveness to inevitable changes to customer requirements. By definition, it also increases the stability of any software project, which leads to improved efficiency and further enablement of continuous delivery and continuous deployment capabilities.