CI/CD refers to the combination of Continuous Integration and Continuous Delivery in software development, and is a methodology that works in conjunction with both Agile and DevOps to create significant improvements in programming deliverability across a development team. Continuous Integration is a practice in software development where the team members share or integrate their work frequently, often more than once a day so there will be multiple in-tegrations in a single day. Each integration by a team member will be validated and verified quickly by an automated build so any errors can be detected earlier and solved quickly.
Continuous Delivery or CD is the continuation of the Continuous Integration. It is the practice to make sure all the code could be safely deployed to the production environment within seconds through a manual trigger. If the process of deploying the source code is automatically triggered, then it is called Continuous Deployment.
Combining CI and CD will enable the development team to deliver more reliable code faster.
How testing works in CI/CD Pipeline?
To make sure that the testing process is completed properly but can keep up with the speed of CI/CD, continuous testing must be done throughout the build. The goal of Continuous Testing is to complete all the testing within the time limit of the development phase and can be run multiple times. Testing starts from the early phase in the CI/CD pipeline, to minimize the risk and impact on users.
According to Mike Cohn, one of the founders of the Scrum methodology, the test suite should consist of 3 components – Unit Tests, Service Tests and User Interface Tests.
Unit tests are usually the earliest part of testing in the CI/CD pipeline and usually done by the developers. The developers create a unit test after they have finished developing the code and are then guided through the test scenario that was created by the tester in the earlier phase.
Next, we have the Service testing, such as API testing, load testing and stress testing. Finally, there is UI testing, including functional and integration testing. These tests usually happen after the code is developed and are then combined as a deployment artifact that can be run on an in-stance, for example on the server or as an APK (the package file format used by the Android OS, used for distribution and installation of any application). All these tests should be automated, to decrease the time taken in execution and ensure that the test can be easily repeated or per-formed in multiple instances.
What are the tools used for Continuous Testing?
There are a lot of tools that can be used to help a team do continuous testing. Some of the more widely used tools include:
Selenium is often used as a tool to automate UI testing. Selenium is an open-source program that can be used in multiple browsers such as Chrome, Firefox, Safari, Edge, etc.
GitHub is a Git repository hosting service. Github is used to store test code so the tester and the rest of the development team can collaborate.
Jenkins is a free and open-source automation server. This is a Continuous Integration tool that helps automate the parts of software development related to building, testing, and deploying. We can ask Jenkins to do a variety of tasks, including completing testing automatically based on the code that has already been created.
Continuous Testing is part of the CI/CD pipeline. The minimum requirements for testing in CI/CD is a unit test, but other tests such us UI tests and regression tests also can be done automatically to make sure the final deployed product is completed to a high standard. By effectively testing your code as it is built, you allow significant improvements to the software to be implemented quickly and effectively, allowing accelerated improvement of product and reduced risks to the users of your software.
Dyah Kurniasih Nurazizah – Tester