Create a continuous validation pipeline

Completed

Although you can run load tests and chaos experiments manually, we recommend that you use an automated process. To do so, integrate both validation tests in your continuous integration and continuous delivery (CI/CD) pipelines and automatically compare the results against predefined baselines.

In this unit, you learn how to use CI/CD pipelines to automate your continuous validation process.

Advantages of automating validation tests

This technique lowers the entry barrier and effort associated with this activity. Developers and operations personnel can use it as part of each release or major change, which improves the quality and consistency of test runs.

Running load test and chaos experiments simultaneously helps you observe system behavior in an environment that simulates real-world traffic. The purpose is to predict failures and not break the system.

As you run your load tests, consider adjusting your baselines for certain situations. For example, you might accept a higher response time when a certain component fails, but you still expect the test to pass.

Set up the automated pipelines

To create a CI/CD pipeline, you can use Azure Pipelines, GitHub Actions, or the CI/CD tool of your choice. This image shows the end-to-end stages of a pipeline in Azure DevOps.

Diagram that shows a sample pipeline that has a load test and a chaos experiment.

  1. In the pipeline, define the Azure Load Testing and Azure Chaos Studio services as infrastructure as code (IaC) by using a tool such as Azure Resource Manager templates, Bicep, or Terraform. Azure Load Testing provides first-party tasks for Azure Pipelines and GitHub Actions to interact with the load-testing service, and to create and orchestrate tests.

    Diagram that shows the pipeline having integrated chaos and load testing.

  2. To properly view the impact of the injected faults, make sure that the load test starts before the faults are injected. Continue to run the test for a while after the chaos experiment is finished.

    Azure portal screenshot that shows a sample test criteria table.

  3. Analyze the failed load tests to see whether the baseline is still accurate or whether it needs to be adjusted.

Demo: Automated continuous validation

This video shows how to integrate Azure Load Testing and Azure Chaos Studio in an Azure CI/CD pipeline.

Knowledge check

1.

How should a load test and a chaos experiment be run and orchestrated?

2.

What needs to be done after a failed load test?