What is constant integration and how can it improve your business?
The term “continuous integration” has been around for decades, but only in recent years has this approach to software development become popular. Its main features are process automation, frequent assembly, controllability and complete transparency of work. We decided to talk about a set of practices and principles that will soon be replaced by fashionable Agile, and at the same time list the main tools that will make continuous integration effective.
What is continuous integration?
Continuous Integration (CI) is a set of software development practices and principles in which team members implement integrations as often as possible. Each such operation should lead to a series of automatic checks, allowing to detect problems even in the early stages of development. Continuous integration is mainly used in projects with a large number of developers or several development teams, because it allows you to reduce the complexity of the process and make it more predictable due to the earliest detection and elimination of errors and contradictions.
Like Agile, CI is not new - it is already over 20 years old. During this time, the approach has managed to prove itself well, and now large companies are increasingly turning to it.
The 3 components of Continuous integration
Continuous integration are sometimes referred to as agile practices. But while Agile focuses on changing thinking and practices (followed by organizational changes), CI is primarily a process of automation that avoids multiple chores. Simply put, continuous integration is the practice of frequent code assemblies in conjunction with its inspection and ongoing testing. And since doing it all manually is difficult, the process is as automated as possible.
A single source code repository
A repository is needed to reduce the risks of losing control over code development or even losing code itself. When several developers work on a project and each of them stores the code in its own way, it is likely that some fragment will be lost. Conflicts cannot be ruled out when a code is integrated by different developers - then you need to organize a backup. In addition, a single repository for the project allows you to conveniently organize the Code Review process in the project and, in case of an error; it allows you to roll back to the working version.
How it works
Now a single code repository is a standard, a kind of a must in development. In "Jet Infosystems" it is used without fail on all projects. For example, about 10 people work on the Jet Signal information security incident management system, and the entire project is conducted in a centralized repository.
- The whole team receives a single entry point.
- Easier to control versions.
- It is possible to get a list of differences between the two versions.
- The whole team gets access to the code.
- Easier to calculate the contribution of each member.
- You can see the history of changes.
- The code can be broken into branches.
Subversion, Git, TFS, Perforce, ClearCase tools.
Automated assembly process
Converting source code to executable files (they are also “artifacts”) is not always easy. And in order to turn the source code into a working system, you need to compile, constantly moving files and loading schemes into databases. Of course, a person can do everything, but there are several reasons why it is better to instruct robots.
How it works
De facto assembly automation is used in all projects. Take the same Jet Signal or Jet Toolbar, designed to organize the feedback channel of the operator and subscriber of data services. There is always a server that automatically collects the written code and saves the result so that any member of the team can find it. Here is an example: suppose that a tester goes to the developer and asks to assembly the code. If there are 5 such assemblies per day (and this is a normal indicator) - this is already 100 minutes spent, and only between one pair of "tester-developer". If the team consists of 5 developers and 5 testers, this is already 500 minutes or 1 person-day, which can be saved by simply setting up automatic assembly.
- The human errors during system assembly are leveled.
- Interchangeability is growing - any developer or tester can deploy the system.
- No need to do manual deployment of the system, more time for development.
- Simplifies the transfer of the system to a new test environment.
- The quality of the product is growing, because there is no need to wait for the end of development to remove bugs and make changes to the functionality.
TFS Build, Maven, Graddle, Ant.
Traditionally, the solution is considered to be a compilation of the project and obtaining the executable part of the program. Of course, after the assembly, the program can be executed, but this does not mean that it will work correctly. Today, most programming languages and development environments can catch some defects already at the programming stage, but even more errors do not come across at the compilation level. One way to catch defects quickly and effectively is testing automation.
How it works
Without going into details, we calculated that when developing Jet Signal, automated tests save us about the same as automated assembly - 1 person-day daily. The main thing to remember: if you have developed an, you need to use it constantly. However, replacing all testers with automated testing will fail - sometimes it’s cheaper and faster to work with people than to waste time and automate this process.
- Automated tests can be performed 24/7, they are much cheaper.
- The speed is much higher than in manual testing.
- They are more reliable because they cannot forget or intentionally miss a test.
- Human and technical risks are reduced, there is no threat of becoming dependent on the development and testing team.
- Automated tests circumvent user interface limitations.