Skip to content

Commit 92a38e6

Browse files
committed
Updated fail criteria section
1 parent 3c83e3f commit 92a38e6

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

articles/load-testing/tutorial-cicd-azure-pipelines.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -407,13 +407,17 @@ In addition, the [load test results file](./how-to-export-test-results.md) is av
407407
408408
---
409409
410-
## Define test pass/fail criteria
410+
## Define test fail criteria
411411
412-
In this section, you'll add criteria to determine whether your load test passes or fails. If at least one of the pass/fail criteria evaluates to `true`, the load test is unsuccessful.
412+
Azure Load Testing enables you to define load test fail criteria. These are criteria that determine when a load test should pass or fail. For example, your load test should fail when the average response time is greater than a specific value, or when too many errors occur.
413413
414-
You can specify these criteria in the test configuration YAML file:
414+
When you run a load test as part of a CI/CD pipeline, the status of the pipeline run will reflect the status of the load test. This allows you to quickly identify performance regressions, or degraded application behavior when the application is experiencing high load.
415415
416-
1. Edit the *SampleApp.yml* file in your GitHub repository.
416+
In this section, you'll configure test fail criteria based on the average response time and the error rate.
417+
418+
You can specify load test fail criteria for Azure Load Testing in the test configuration YAML file. Learn more about [configuring load test fail criteria](./how-to-define-test-criteria.md).
419+
420+
1. Edit the *SampleApp.yml* file in your fork of the sample application GitHub repository.
417421
418422
1. Add the following snippet at the end of the file:
419423
@@ -430,40 +434,37 @@ You can specify these criteria in the test configuration YAML file:
430434
431435
1. Commit and push the changes to the main branch of the repository.
432436
433-
The changes will trigger the Azure Pipelines CI/CD workflow.
437+
The changes will trigger the CI/CD workflow.
434438
435-
1. On the page for pipeline runs, select the most recent entry from the list.
439+
1. After the test finishes, notice that the CI/CD pipeline run has failed.
436440
437-
After the load test finishes, you'll notice that the pipeline failed because the average response time was higher than the number that you specified in the pass/fail criteria.
441+
In the CI/CD output log, you find that the test failed because one of the fail criteria was met. The load test average response time was higher than the value that you specified in the pass/fail criteria.
438442
439443
:::image type="content" source="./media/tutorial-cicd-azure-pipelines/test-criteria-failed.png" alt-text="Screenshot that shows pipeline logs after failed test criteria.":::
440444
441445
The Azure Load Testing service evaluates the criteria during the test run. If any of these conditions fails, Azure Load Testing service returns a nonzero exit code. This code informs the CI/CD workflow that the test has failed.
442446
443-
1. Edit the *SampleApp.yml* file and change the test's pass/fail criteria:
447+
1. Edit the *SampleApp.yml* file and change the test's pass/fail criteria to increase the criterion for average response time:
444448
445449
```yaml
446450
failureCriteria:
447451
    - avg(response_time_ms) > 5000
448452
    - percentage(error) > 20
449453
```
450454
451-
1. Commit the changes to trigger the Azure Pipelines CI/CD workflow.
452-
453-
:::image type="content" source="./media/tutorial-cicd-azure-pipelines/test-criteria-passed.png" alt-text="Screenshot that shows pipeline logs after all test criteria pass.":::
455+
1. Commit the changes to trigger the CI/CD workflow again.
454456
455-
The load test now succeeds and the pipeline finishes successfully.
457+
After the test finishes, you notice that the load test and the CI/CD workflow run complete successfully.
456458
457459
## Clean up resources
458460
459461
[!INCLUDE [alt-delete-resource-group](../../includes/alt-delete-resource-group.md)]
460462
461463
## Next steps
462464
463-
You've now created an Azure Pipelines CI/CD workflow that uses Azure Load Testing for automatically running load tests. By using pass/fail criteria, you can set the status of the CI/CD workflow. With parameters, you can make the running of load tests configurable.
465+
You've now created a CI/CD workflow that uses Azure Load Testing to automate running load tests. By using load test fail criteria, you can set the status of the CI/CD workflow and quickly identify performance and application behavior degradations.
464466
465-
* Learn more about [comparing results from multiple test runs](./how-to-compare-multiple-test-runs.md).
466-
* Learn more about the [Azure Load Testing task](/azure/devops/pipelines/tasks/test/azure-load-testing).
467-
* Learn more about [Parameterizing a load test](./how-to-parameterize-load-tests.md).
468-
* Learn more [Define test pass/fail criteria](./how-to-define-test-criteria.md).
469467
* Learn more about [Configuring server-side monitoring](./how-to-monitor-server-side-metrics.md).
468+
* Learn more about [Comparing results across multiple test runs](./how-to-compare-multiple-test-runs.md).
469+
* Learn more about [Parameterizing a load test](./how-to-parameterize-load-tests.md).
470+
* Learn more about [Defining test pass/fail criteria](./how-to-define-test-criteria.md).

0 commit comments

Comments
 (0)