Continuous Integration

Written on

Definition

Continuous Integration (CI) is the practice of merging all developer working copies to a shared mainline continuously (as soon as developers publish their changes), and run automated tests over the combined (“integrated”) development efforts of the team. This practice typically implies static code analysis and test-driven (TDD) or behavior-driven development (BDD).

CI is about making sure that changes introduced to the code base by different developers also work when put together. This is usually achieved by running the same set of tests again over the whole code base at each addition of a change set.

Typically, before automated tests are run the code base is quality checked with static code analysis tools to help detect syntax errors and code smell. Tests are run with a test coverage detection tool to identify areas of poor test coverage in the code.

CI can be combined with continuous deployment. CI is the cornerstone of continuous delivery.

Guiding Principles

  • Everything that is not in the repository does not exist” (put everything under version control)
  • Every new feature deserves its own branch” (feature branching)
  • Merge early, merge often” (avoid merge conflicts)
comments powered by Disqus