Skip to content

Commit ee8ad48

Browse files
authored
Merge pull request #247598 from ntrogh/alt-cicd
[Azure Load Testing] Update One-click CI/CD
2 parents 5044c14 + c284ac6 commit ee8ad48

9 files changed

+90
-28
lines changed

articles/load-testing/how-to-configure-load-test-cicd.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,13 @@ ms.date: 06/05/2023
1111

1212
# Manually configure CI/CD for load tests in GitHub Actions or Azure Pipelines
1313

14-
Get started with automating load tests in Azure Load Testing by adding it to a CI/CD pipeline. After running a load test in the Azure portal, you export the configuration files, and configure a CI/CD pipeline in GitHub Actions or Azure Pipelines.
14+
You can automate a load test in Azure Load Testing by creating a CI/CD pipeline. In this article, you learn how to manually configure GitHub Actions or Azure Pipelines to invoke an existing test in Azure Load Testing. Automate a load test to continuously validate your application performance and stability under load.
1515

16-
After you complete this quickstart, you have a CI/CD workflow that is configured to run a load test with Azure Load Testing.
16+
To add an existing load test to a CI/CD pipeline:
17+
18+
- Configure service authentication to allow GitHub Actions or Azure Pipelines to connect to your Azure load testing resource.
19+
- Export the load test configuration files, such as the JMeter file and load test YAML configuration.
20+
- Update the CI/CD pipeline definition to invoke Azure Load Testing.
1721

1822
## Prerequisites
1923

@@ -346,6 +350,6 @@ If you don't plan to use any of the resources that you created, delete them so y
346350
347351
Advance to the next article to learn how to identify performance regressions by defining test fail criteria and comparing test runs.
348352
349-
> [!div class="nextstepaction"]
350-
> [Tutorial: automate regression tests](./tutorial-identify-performance-regression-with-cicd.md)
351-
> [Define test fail criteria](./how-to-define-test-criteria.md)
353+
- [Tutorial: automate regression tests](./tutorial-identify-performance-regression-with-cicd.md)
354+
- [Define test fail criteria](./how-to-define-test-criteria.md)
355+
- [View performance trends over time](./how-to-compare-multiple-test-runs.md)
Loading
Loading
101 KB
Loading
42.1 KB
Loading
-147 KB
Loading
43.6 KB
Loading
Lines changed: 77 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
title: 'Quickstart: Configure a CI/CD pipeline for a load test from Azure portal'
2+
title: 'Quickstart: Automate load tests with CI/CD'
33
titleSuffix: Azure Load Testing
4-
description: 'Learn how to configure a CI/CD pipeline for an existing load test in Azure Load Testing from Azure portal'
4+
description: 'Learn how to automate an existing load test by adding it to Azure Pipelines directly from the Azure portal. Run load tests in your CI/CD pipeline to automate performance regression testing.'
55
services: load-testing
66
ms.service: load-testing
77
ms.topic: quickstart
@@ -11,54 +11,109 @@ ms.date: 08/05/2023
1111
adobe-target: true
1212
---
1313

14-
# Quickstart: Configure a CI/CD pipeline for an existing load test in Azure Load Testing
14+
# Quickstart: Automate an existing load test with CI/CD
1515

16-
Get started with automating load tests in Azure Load Testing by adding it to a CI/CD pipeline from Azure portal. After running a load test in the Azure portal, you can configure your Azure DevOps settings to create a pipeline to run the test.
16+
In this article, you learn how to automate an existing load test by creating a CI/CD pipeline in Azure Pipelines. Select your test in Azure Load Testing, and directly configure a pipeline in Azure DevOps that triggers your load test with every source code commit. Automate load tests with CI/CD to continuously validate your application performance and stability under load.
17+
18+
If you want to automate your load test with GitHub Actions, learn how to [manually configure a CI/CD pipeline for Azure Load Testing](./how-to-configure-load-test-cicd.md).
1719

1820
## Prerequisites
1921

2022
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
2123

22-
- An Azure Load Testing test. Create a [URL-based load test](./quickstart-create-and-run-load-test.md) or [use an existing JMeter script](./how-to-create-and-run-load-test-with-jmeter-script.md) to create a load test.
24+
- Your Azure account needs to have the [Application Administrator](/azure/active-directory/roles/permissions-reference#application-administrator) role. See [Check access for a user to Azure resources](/azure/role-based-access-control/check-access) to verify your permissions.
2325

2426
- An Azure DevOps organization and project. If you don't have an Azure DevOps organization, you can [create one for free](/azure/devops/pipelines/get-started/pipelines-sign-up?view=azure-devops&preserve-view=true).
2527

28+
- Your Azure DevOps organization is connected to Azure Active Directory in your subscription. Learn how you can [connect your organization to Azure Active Directory](/azure/devops/organizations/accounts/connect-organization-to-azure-ad).
29+
30+
- A load testing resource, which contains a test. Create a [URL-based load test](./quickstart-create-and-run-load-test.md) or [use an existing JMeter script](./how-to-create-and-run-load-test-with-jmeter-script.md) to create a load test.
31+
2632
## Configure a CI/CD pipeline
2733

2834
In this section, you'll create a CI/CD pipeline in Azure Pipelines to run an existing load test. The test files like JMeter script and [test configuration YAML](/azure/load-testing/reference-test-config-yaml) will be committed to your repository.
2935

3036
1. In the [Azure portal](https://portal.azure.com/), go to your Azure load testing resource.
3137

32-
1. On the left pane, select **Tests** to view a list of tests.
38+
1. On the left pane, select **Tests** to view the list of tests.
39+
40+
1. Select a test from the list by selecting the checkbox, and then select **Set up CI/CD**.
41+
42+
:::image type="content" source="media/how-to-set-up-cicd-pipeline-from-portal/list-of-tests.png" alt-text="Screenshot that shows the list of tests in Azure portal." lightbox="media/how-to-set-up-cicd-pipeline-from-portal/list-of-tests.png":::
43+
44+
1. Enter the following details for creating a CI/CD pipeline definition:
45+
46+
|Setting|Value|
47+
|-|-|
48+
| **Organization** | Select the Azure DevOps organization where you want to run the pipeline from. |
49+
| **Project** | Select the project from the organization selected above. |
50+
| **Repository** | Select the source code repository to store and run the Azure pipeline from. |
51+
| **Branch** | Select the branch in the selected repository. |
52+
| **Repository branch folder** | (Optional) Enter the repository branch folder name in which you'd like to commit. If empty, the root folder is used. |
53+
| **Override existing files** | Check this setting. |
54+
| **Service connection** | Select *Create new* to create a new service connection to allow Azure Pipelines to connect to the load testing resource.<br/><br/>If you already have a service connection with the *Load Test Contributor* role on the resource, choose *Select existing* and select the service connection from the dropdown list. |
55+
56+
:::image type="content" source="media/how-to-set-up-cicd-pipeline-from-portal/set-up-cicd-pipeline.png" alt-text="Screenshot that shows the settings to be configured to set up a CI/CD pipeline." lightbox="media/how-to-set-up-cicd-pipeline-from-portal/set-up-cicd-pipeline.png":::
57+
58+
> [!IMPORTANT]
59+
> If you're getting an error creating a PAT token, or you don't see any repositories, make sure to [connect your Azure DevOps organization to Azure Active Directory (Azure AD)](/azure/devops/organizations/accounts/connect-organization-to-azure-ad). Make sure the directory in Azure DevOps matches the directory you're using for Azure Load Testing. After connecting to Azure AD, close and reopen your browser window.
60+
61+
1. Select **Create Pipeline** to start creating the pipeline definition.
62+
63+
Azure Load Testing performs the following steps to configure the CI/CD pipeline:
64+
65+
- Create a new service connection of type [Azure Resource Manager](/azure/devops/pipelines/library/service-endpoints#azure-resource-manager-service-connection) in the Azure DevOps project. The service principal is automatically assigned the *Load Test Contributor* role on the Azure load testing resource.
66+
67+
- Commit the JMeter script and test configuration YAML to the source code repository.
68+
69+
- Create a pipeline definition that invokes the Azure load testing resource and runs the load test.
70+
71+
1. When the pipeline creation finishes, you receive a notification in the Azure portal with a link to the pipeline.
72+
73+
1. Optionally, you can open the pipeline definition and modify the pipeline steps or change when the pipeline is triggered.
74+
75+
You now have a CI/CD pipeline in Azure Pipelines that invokes your load test when the pipeline is triggered. By default, the pipeline is triggered whenever you push an update to the selected branch.
76+
77+
:::image type="content" source="media/how-to-set-up-cicd-pipeline-from-portal/load-testing-generated-pipeline.png" alt-text="Screenshot that shows the Azure pipeline in Azure DevOps that was generated by Azure Load Testing." lightbox="media/how-to-set-up-cicd-pipeline-from-portal/load-testing-generated-pipeline.png":::
78+
79+
## Grant permission to service connection
80+
81+
When you run the CI/CD pipeline for the first time, you need to grant permission to the pipeline to access the service connection and start the load test.
82+
83+
1. Sign in to your Azure DevOps organization (`https://dev.azure.com/<your-organization>`), and select your project.
84+
85+
Replace the `<your-organization>` text placeholder with your project identifier.
86+
87+
1. Select **Pipelines** in the left navigation, and then select your pipeline.
3388

34-
1. Select your test from the list by selecting the checkbox, and then select **Set up CI/CD**.
89+
Notice that the pipeline run status is *Pending*.
3590

36-
:::image type="content" source="media/how-to-set-up-cicd-pipeline-from-portal/list-of-tests.png" alt-text="Screenshot that shows the list of tests in Azure portal.":::
91+
1. Select the pending pipeline run, and then select **View**.
3792

38-
1. Enter the details for configuring the pipeline. Select the Azure DevOps organization where you want to run the pipeline from.
93+
An alert message is shown that the pipeline needs permission to access the load test resource.
3994

40-
1. Select the project from the organization selected above.
95+
:::image type="content" source="media/how-to-set-up-cicd-pipeline-from-portal/azure-pipelines-need-permission.png" alt-text="Screenshot that shows the alert message that the Azure pipeline run needs permission to access a resource." lightbox="media/how-to-set-up-cicd-pipeline-from-portal/azure-pipelines-need-permission.png":::
4196

42-
1. Select a repository from the project selected above.
97+
1. Select **Permit**, and then select **Permit** again in the confirmation window.
4398

44-
1. Select a branch from the repository selected above.
99+
:::image type="content" source="media/how-to-set-up-cicd-pipeline-from-portal/azure-pipelines-grant-permission-service-connection.png" alt-text="Screenshot that shows the grant permission window in Azure Pipelines to grant access to the service connection for running a load test." lightbox="media/how-to-set-up-cicd-pipeline-from-portal/azure-pipelines-grant-permission-service-connection.png":::
45100

46-
1. Enter the repository branch folder name in which you'd like to commit. If not provided files will be committed to the root folder.
101+
The CI/CD pipeline run now starts and accesses the Azure load testing resource to run the test.
47102

48-
1. Select Override existing file to edit existing files with the same name in the folder.
49-
50-
1. Select Create new, if you'd like to create a new service connection. A service connection of type [Azure Resource Manager](/azure/devops/pipelines/library/service-endpoints#azure-resource-manager-service-connection) with automatic Service Principal will be created in the project. The Service Principal will be automatically assigned *Load Test Contributor* role on the resource.
103+
## View load test results in CI/CD
51104

52-
1. If you already have a service connection with *Load Test Contributor* role on the resource, select existing service connection from the dropdown.
105+
You can view the load test summary results directly in the CI/CD output log.
53106

54-
:::image type="content" source="media/how-to-set-up-cicd-pipeline-from-portal/set-up-cicd-pipeline.png" alt-text="Screenshot that shows the settings to be configured to set up a CI/CD pipeline.":::
107+
:::image type="content" source="./media/how-to-set-up-cicd-pipeline-from-portal/azure-pipelines-log-load-testing-summary.png" alt-text="Screenshot that shows the Azure Pipelines output log information, highlighting the load testing results." lightbox="./media/how-to-set-up-cicd-pipeline-from-portal/azure-pipelines-log-load-testing-summary.png":::
55108

56-
1. Click on Create Pipeline.
109+
The generated CI/CD pipeline publishes the load test results as a pipeline artifact. You can download these results as a CSV file for further reporting.
57110

58-
The JMeter script and test configuration YAML will be committed to the repository. A pipeline will be automatically created and will be triggered whenever you push an update to the branch selected. You will get a notification with the link to th pipeline. You can click and modify the pipeline if needed.
111+
:::image type="content" source="./media/how-to-set-up-cicd-pipeline-from-portal/azure-pipelines-artifacts-load-testing-results.png" alt-text="Screenshot that shows the artifacts page for pipeline run in Azure Pipelines, highlighting the load test results zip file." lightbox="./media/how-to-set-up-cicd-pipeline-from-portal/azure-pipelines-artifacts-load-testing-results.png":::
59112

60113
## Next steps
61114

62-
You've configured a CI/CD pipeline for an existing load test. You can view the load test results in the output logs after the test run.
115+
You've configured a CI/CD pipeline in Azure Pipelines for an existing load test.
63116

64-
- Learn how to [view load test results in CI/CD pipeline](/azure/load-testing/how-to-configure-load-test-cicd#view-load-test-results).
117+
- [Define test fail criteria](./how-to-define-test-criteria.md)
118+
- [View performance trends over time](./how-to-compare-multiple-test-runs.md)
119+
- [Manually configure a CI/CD pipeline for Azure Load Testing](./how-to-configure-load-test-cicd.md), if you want to add a load test to GitHub Actions or use an existing pipeline

articles/load-testing/toc.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@ items:
1313
- name: Create & run a load test
1414
href: quickstart-create-and-run-load-test.md
1515
- name: Automate load tests with CI/CD
16+
displayName: Azure Pipelines, CI/CD, continuous integration, Azure DevOps, GitHub Actions, automation, automated testing, regression testing
1617
href: quickstart-add-load-test-cicd.md
1718
- name: Tutorials
1819
items:
1920
- name: Identify performance bottlenecks
2021
href: tutorial-identify-bottlenecks-azure-portal.md
2122
- name: Automate regression tests with CI/CD
23+
displayName: Azure Pipelines, CI/CD, continuous integration, Azure DevOps, GitHub Actions, automation, automated testing, regression testing
2224
href: tutorial-identify-performance-regression-with-cicd.md
2325
- name: Concepts
2426
items:
@@ -45,7 +47,8 @@ items:
4547
href: how-to-configure-user-properties.md
4648
- name: Customize tests with JMeter plugins
4749
href: how-to-use-jmeter-plugins.md
48-
- name: Configure a CI/CD pipeline from Azure portal
50+
- name: Configure CI/CD for load testing
51+
displayName: Azure Pipelines, CI/CD, continuous integration, Azure DevOps, GitHub Actions, automation, automated testing, regression testing
4952
href: how-to-configure-load-test-cicd.md
5053
- name: Run tests
5154
items:

0 commit comments

Comments
 (0)