Continuous integration creates a solution for a situation like the following: a company is working on a large project for which the customer should receive comprehensive, complex software. Individual teams develop different sections of the application and the developers program individual functions. After months of work, perhaps years, everything has to be put together – and then problems arise. In this situation, it can take months until the bugs are detected and fixed, and all code snippets are put together. All the while, final testing and deployment is rapidly approaching.
With continuous integration, integrating new code takes place much earlier, not when all participants have completed their sections. Instead, developers add their finished code to the mainline once or several times a day – the source code is then open to all programmers. Since these are always relatively small sections of code, the integration is also rather short. A developer should only need a few minutes to make their work available to the rest of the team. If an error is discovered, it can be detected immediately, and in the best case, quickly corrected.