In this article we will introduce a few example tools and techniques specific to Jenkins , the most popular CI/CD automation tool.
What is CI/CD?
CI/CD stands for continuous integration and continuous delivery / continuous deployment. It’s both a methodology and a toolset for introducing automation into various development stages.
Traditionally apps and websites have been deployed manually, following a prescribed series of steps. CI/CD changes this by introducing a whole series of additional tooling into the mix that makes sure that you can automatically deploy code and features into your production environment.
The methodology itself follows several steps, depending on the maturity of the business and the requirements of the team and the business.
What does CI/CD mean for performance?
When releasing code regularly, best practice would advise that you need to performance test regularly. Performance metrics can be used to pass/ fail a build, which means that developers need to apply fixes before they can complete a release. While the additional testing does slow down the deployment process, this is by far the best way to ensure that any releases do not suffer from major issues.
What should be tested?
We recommend that the pipeline contains the following types of checks:
- Load and scalability tests, especially for lower environments (performance testing in production in an automated deployment may be challenging, therefore these in practice need to be scheduled separately if they are conducted).
- Page load tests (synthetic testing for key user journeys) and load checks for key APIs.
- Performance budget checks (based on frontend page construction).
- Code quality checks.
- Cache config checks (covering both your browser cache config settings and your CDN cache settings where relevant).
Pipeline design for performance
When designing your pipeline, it’s important to consider where performance checking is relevant. Here is a sample pipeline. Performance related steps are highlighted in yellow:
Links to additional resources
Here are some useful links to get started with Performance testing and Optimization in a Jenkins CI/CD pipeline: