What is Continuous Integration in Agile methodology?

Continuous Integration (CI) is a practice in Software Engineering, where all the developers local working code base will be merged to share with a common repository several times during the product development. It was first adopted as a part of Extreme Programming (XP). The main purpose of CI is prevent developers stepping over each other code and eliminate integration issues. CI works in tandem with other best practices like Configuration management, compilation, software build, deployment, and testing which are bundled into a single automated and repeatable process. Due to rapid integration of code, it is more likely that defects surface faster than it could compare to normal manual integration.

CI has the following built in automation to check the validity of the code that was checked in:

  • Static code analysis: Reporting the results of static code execution
  • Compile: Generating the executable files by linking the code and compiling after
  • Unit test: Writing unit tests, executing them, checking code coverage and reporting the results
  • Deploy: Build the code and install it into a test/production environment.
  • Integration test: Providing results by executing the integration tests.
  • Report (dashboard): Indicating the status of key parameters by posting Red, Green, and Yellow to a publicly visible location.

The Cycle of CI has been shown below in the figure 3

Continuous Integration in Agile Methodology

Figure 3: Cycle of Continuous Integration


CI helps testers to perform automation effectively to uncover defects at a faster rate and improve the regression results. The automation will also give the percentage of test coverage area. The automation report also covers the number of user stories and functionality mapped to the product increment. Automation also reduces the manual testing effort of the testers and makes their life easy. Testers can also manually test the areas of failure and collaborate with the developers to fix the defects.

There are several tools that are being used in organizations as a part of continuous integration to build the automation scripts. Few examples of the tools are JUnit, Selenium, SONAR etc. CI automation will reduce the time to deliver, since it replaces the traditional manual testing. Build tools are linked to automation server and build server and deploy to testing, staging and production environments. Organizations started using these build tools to replace the traditional quality control.

CI provides the following benefits to its users

  • Enables a quick feedback mechanism on the build results
  • Helps collaboration between various product teams within the same organization
  • Decreases the risk of regression since the code is often churned by other developers.
  • Maintains version control within for various product releases and patch releases.
  • Reduces the technical debt within the code.
  • Allows earlier detection and prevention of defects
  • Reduces manual testing effort
  • Provides a facility of falling back to previous versions in case of any problem to the current build

CI also has the following risks and challenges:

  • CI tools maintenance and their administration have associated costs to it.
  • CI guidelines need to be well established before starting it.
  • Test automation is a rare skill in the market and existing testers may have to be trained on that.
  • Full fledge test coverage is required to see the benefits to automation.
  • Teams sometimes depend too much on the unit testing and ignore automation and acceptance testing.

So in summary, CI is advantageous to a project team, if the required tools are put in place for automating the build process.