What is Continuous Integration and Why Did It Evolve?

Continuous Integration (CI) is the software development practice, where code committed by individual developers is integrated and built on a centralized server continuously throughout the development lifecycle. The main motto of continuous integration is "Fail Fast" - if something is wrong, let it fail fast and come out early - don't wait until things pile up to figure out that something went wrong. The most obvious benefit of this is that anything that breaks a stable build will be flagged immediately.

Continuous Integration (CI) is the process of automating the build and testing of code every time a team member commits changes to version control"

From a high level, CI is an Agile-enabler. One of the goals of Agile is to make sure that a team works closely together, and everyone knows what is going on with the project, what the status is, etc. With CI, one can see the build status, new changes in the latest builds, and even get a copy of the latest binary to check it out. This brings in more accountability and transparency to the entire development process, which is why V-Soft loves to make it part of our everyday development process.

CI Tools

Some of the most widely used CI tools in the industry are:

Jenkins

TeamCity

VSTS and TFS

Bamboo

GitLab CI

CircleCI

Codeship

Codefresh

Travis CI

Evolution of CI

The concept of continuous integration is hardly new. It's been around in different forms and with different names (daily/nightly builds) for any sizeable project that is being actively worked on. The simple reason is that as multiple people start contributing code, it becomes important to make sure the whole software continues to at least build completely, even if different developers might have done their own unit tests. Developers might use different environments for running their code; it's important to try the build in a neutral and standard environment - which is what CI does.

The reason that CI is becoming more prominent nowadays is that around the world software development is evolving very fast, with practitioners automating as many parts of it as possible to save costs and to enable developers to do more. Previously, you could imagine a group of developers working on a tightly integrated project in a single repository, and, one or two leads working to make sure nothing breaks anywhere, but this is hardly the case nowadays.

With micro-service architecture and cloud deployments, there are now many groups of developers contributing codes to independent parts of a product. It is important to understand that, without an automated system, one person alone can’t practically coordinate and run integration builds. This is where CI comes into the scene. CI is not just for mature organizations, any startup or even a two developers combo will benefit from using CI.

Example:

Imagine an organization with two or three developers, working on just a couple of modules. Developers will commit code and a lead developer will pull all changes daily once and run a build. Say the team lead failed to run a build every time due to other commitment. By the time a daily build is run, if something breaks, they must go back to logs and figure out whose commit broke the build. This essentially wastes the lead's time as well as other developers' time, with whom the lead must coordinate to figure out the issue and fix it.

(Want to know the benefits Continuous Integration can to overall software development process, click here)

The Various Stages of CI Process

Even though CI is about simply integrating everyone's contributions, it is usually used to do more than that. We build a pipeline for our CI process, which can take care of the below items as well:

Static Code Review: This ensures that developers commit code that passes the organization's coding standards - refactored, efficient code; documented, well-indented code; no unused variables, unused methods, etc. This can be generated as a report for each build and is something developers can learn and improve upon.

Unit Tests: Unit tests run the automated tests on the code/build after the build is generated. This makes sure there are no regression issues caused by the new changes. As software grows, this ensures stability and confidence in the product.

UITests: These run the UI tests which are functional tests that, make sure the UI is functioning correctly and user stories are working as expected.

Profiling: This stage can even run profiling by running the new build on an actual device and giving a report, maybe comparing with previous runs, regarding memory, CPU, battery, and network usage.

Automated Reporting: If the build fails due to unsatisfactory results in any of the above stages, send a report to developer/managers. If the build succeeds, it will be sent to QA/Stakeholders, along with release notes.

Does the idea of CI thrill you? If you are interested in having CI powered development process, then V-Soft with its right cult of expertise can assist in getting effective mobile app. To learn more about our abilities set up a free consultation with one of our talented experts to discuss your needs today.

About the Author

Aswin Kumar is the Practice Head for Mobile Solutions at V-Soft Consulting. Aswin leads the design and development that collaborates with leading companies to build mobile capabilities for existing and newly innovative platforms. Aswin and his team understand the requirement for back-end integration of cloud or premise based systems with a mobile application that delivers industry leading results for the enterprise. Aswin also leads the emerging technology initiatives like AR, AI, and ML.