What is CI/CD (Continuous Integration and Continuous Delivery)?
In Continuous integration, developers keep integrating their developed code in a common and shared repository. In Continuous delivery or “Continuous Deployment” the codes that are merged by the developers are continuously delivered to the live environment.
Why do you need continuous testing in such a system?
The development team works in parallel and the team members keep integrating their code in the repository
This keeps updating the master branch regularly. And so there arises a need to continue testing the code to keep the software quality. It has to be ensured that the testing goes on at the same pace.
Manual testing will not be a good choice in such a scenario. Automated testing though can promise you successful testing in CI/CD pipeline.
Since the CI model supports the parallel testing of the code it helps in early identification of problems.
Why Automate Testing in CI/CD?
In CI, the testing has to keep up with the code development. Builds has to be tested regularly for any changes and modifications. To keep up the pace and deal with the regular testing requirements, automation testing is preferred in the CI model.
Testing Stages in Continuous Integration/Continuous Delivery Model
The testing process goes through the following stages in the CI/CD model:
This process is repeated for every build.
Where Does Automation Testing Fall in This CI/CD Pipeline?
Automated tested is done when the build is completed and code is read7y to be deployed. At this stage, the automated unit tests, integration tests and UI tests can be conducted.
Tests can also be parallel done to fasten testing speed.
Tools Used for CI/CD
Setting up the CI/CD pipeline for automated testing
Setup a build server/ continuous integration (CI) server. You can opt for continuous integration (CI) server. After setting up the server, set up the first build. A build contains:
This is set up whenever a change is done to the source code.
Setup the test suite to test your build. A separate build is set for your test suites.
The deployment has to be linked to the test suite so that whenever your build passes all the tests the changes are deployed to production.
Practices to avoid
Here are few benefits of using automated testing in CI/CD model:
CI/CD model is a very popular and helpful model in software development. Automation testing adds to its value by enhancing the testing of the software. But any faulty practice can increase your work and can decrease the efficiency of the complete process. So be very wise while setting up and performing automation testing in CI/CD model.