Continuous integration means frequently integrating small changes from developers’ workspaces into a shared source repository. It also generally includes verifying the integrated code with automated tests: compiling says the code can be built; tests help check that it works. section 1.5.3
Small, frequent integrations help keep developers’ work from diverging. Waiting longer to check in while the rest of the team keeps changing the repository can make manual merging more likely. section 1.3.4 section 1.5.3
A fast check followed by a full build
Suppose the full test suite takes too long to run after every small change. First, run the tests most relevant to your change locally. Then commit the change to the repository. A continuous integration server detects it, runs a clean build and the full test suite, and sends a build report. You can move on while the longer checks run. section 1.5.3
Figure 1.12. This is a typical scenario of a developer (1) running a relevant subset of automated tests locally before (2) committing the change to the source repository. In the third step (3), the change triggers a new build on the continuous integration server (using a commit-hook in the repository or by frequently polling the repository for changes). Finally, after running a clean build with the latest changes (4), the continuous integration server sends a build report to the developer via email.
Follow the change from local tests and commit through the server build and report. section 1.5.3
This is a trade-off: a quick local subset gives faster feedback, but it may miss a failure that the full suite finds later. Also, a server alone is not continuous integration. If developers do not integrate frequently, their workspaces can still diverge while the server sits idle. section 1.3.4 section 1.5.3




