In software development projects it is common to find teams in which two or more developers work on the same set of software artifacts. According to the Scrum methodology, for example, it is common for the whole team to work together to solve one story at a time, aiming for a greater number of deliverables at the end of Sprint.
One way to track and join changes for all developers is to use version control, but what if the implementation of a new functionality impacts on the functioning of an already existing one? What if changes made by different developers conflict about how the system works? And, how to accomplish this control in agile projects?
Definition of Continuous Integration
For this, a software development practice called Continuous Integration is used. According to Martin Fowler, Continuous Integration is:
“A software development practice where members of a team integrate their work frequently, usually each person integrates at least daily – there may be multiple integrations per day. Each integration is verified by an automated build (including testing) to detect integration errors as quickly as possible. Many teams think this approach leads to a significant reduction in integration issues and allows a team to develop cohesive software faster. “
Due to the speed of development of a system according to some agile methodology, with the passage of time it may become necessary to improve the design and readability of the code, that is, it may become necessary to perform a refactoring. However at the same time it is necessary that after the refactoring process the system is in perfect working order. The practice of Continuous Integration immediately identifies errors that might have been introduced because of the refactoring process, for example.
Not only errors in system operation, but also compilation errors are targets of Continuous Integration. Through automatic build to each commit, Continuous Integration checks if the system is cohesive.
An important practice foreseen by Continuous Integration is the execution of the automated tests with each integration. Especially in large projects, it is more difficult and costly for each developer to be responsible for running the automated tests locally on their workstation.
Benefits of Continuous Integration
The practice of Continuous Integration brings agility to the development process since it takes the developer’s responsibility to run the automated tests (which can take hours or even days) on their local machine, freeing them to work directly on system development. In addition to the question of time, it is worth remembering that once the automated tests are executed with each integration, the chances of the tests falling by the wayside or even being left out becomes much smaller, always guaranteeing a quality product throughout development time.
Therefore, Continuous Integration is a way to bring security to the changes, which are very common in agile projects. Once a change in the code causes a build break or some test, the team learns of the occurrence immediately, preventing the changes from introducing errors in the project being developed.