Skip to content

Commit c2932b7

Browse files
authored
Merge pull request #191407 from ntrogh/alt-devops-task
Removed task definition and refer to DevOps repo
2 parents d66eb01 + 2e333ae commit c2932b7

File tree

1 file changed

+28
-56
lines changed

1 file changed

+28
-56
lines changed

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

Lines changed: 28 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ms.topic: tutorial
1313

1414
# Tutorial: Identify performance regressions with Azure Load Testing Preview and Azure Pipelines
1515

16-
This tutorial describes how to automate performance regression testing by using Azure Load Testing Preview and Azure Pipelines. You'll configure an Azure Pipelines continuous integration and continuous delivery (CI/CD) workflow to run a load test for a sample web application. You'll then use the test results to identify performance regressions.
16+
This tutorial describes how to automate performance regression testing by using Azure Load Testing Preview and Azure Pipelines. You'll configure an Azure Pipelines CI/CD workflow with the [Azure Load Testing task](/azure/devops/pipelines/tasks/test/azure-load-testing?view=azure-devops) to run a load test for a sample web application. You'll then use the test results to identify performance regressions.
1717

1818
If you're using GitHub Actions for your CI/CD workflows, see the corresponding [GitHub Actions tutorial](./tutorial-cicd-github-actions.md).
1919

@@ -38,7 +38,7 @@ You'll learn how to:
3838
* 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). If you need help with getting started with Azure Pipelines, see [Create your first pipeline](/azure/devops/pipelines/create-first-pipeline?preserve-view=true&view=azure-devops&tabs=java%2Ctfs-2018-2%2Cbrowser).
3939
* A GitHub account, where you can create a repository. If you don't have one, you can [create one for free](https://github.com/).
4040

41-
## Set up your repository
41+
## Set up the sample application repository
4242

4343
To get started, you need a GitHub repository with the sample web application. You'll use this repository to configure an Azure Pipelines workflow to run the load test.
4444

@@ -105,11 +105,11 @@ To access Azure resources, create a service connection in Azure DevOps and use r
105105
106106
## Configure the Azure Pipelines workflow to run a load test
107107
108-
In this section, you'll set up an Azure Pipelines workflow that triggers the load test. The sample application repository contains a pipelines definition file. The pipeline first deploys the sample web application to Azure App Service, and then invokes the load test. The pipeline uses an environment variable to pass the URL of the web application to the Apache JMeter script.
108+
In this section, you'll set up an Azure Pipelines workflow that triggers the load test.
109109
110-
First, you'll install the Azure Load Testing extension from the Azure DevOps Marketplace, create a new pipeline, and then connect it to the sample application's forked repository.
110+
The sample application repository already contains a pipelines definition file. This pipeline first deploys the sample web application to Azure App Service, and then invokes the load test by using the [Azure Load Testing task](/azure/devops/pipelines/tasks/test/azure-load-testing?view=azure-devops). The pipeline uses an environment variable to pass the URL of the web application to the Apache JMeter script.
111111
112-
1. Install the Azure Load Testing task extension from the Azure DevOps Marketplace.
112+
1. Install the **Azure Load Testing** task extension from the Azure DevOps Marketplace.
113113
114114
:::image type="content" source="./media/tutorial-cicd-azure-pipelines/browse-marketplace.png" alt-text="Screenshot that shows how to browse the Visual Studio Marketplace for extensions.":::
115115
@@ -127,7 +127,25 @@ First, you'll install the Azure Load Testing extension from the Azure DevOps Mar
127127
128128
:::image type="content" source="./media/tutorial-cicd-azure-pipelines/create-pipeline-select-repo.png" alt-text="Screenshot that shows how to select the sample application's GitHub repository.":::
129129
130-
The repository contains an *azure-pipeline.yml* pipeline definition file. You'll now modify this definition to connect to your Azure Load Testing service.
130+
The repository contains an *azure-pipeline.yml* pipeline definition file. The following snippet shows how to use the [Azure Load Testing task](/azure/devops/pipelines/tasks/test/azure-load-testing?view=azure-devops) in Azure Pipelines:
131+
132+
```yml
133+
- task: AzureLoadTest@1
134+
inputs:
135+
azureSubscription: $(serviceConnection)
136+
loadTestConfigFile: 'SampleApp.yaml'
137+
resourceGroup: $(loadTestResourceGroup)
138+
loadTestResource: $(loadTestResource)
139+
env: |
140+
[
141+
{
142+
"name": "webapp",
143+
"value": "$(webAppName).azurewebsites.net"
144+
}
145+
]
146+
```
147+
148+
You'll now modify the pipeline to connect to your Azure Load Testing service.
131149
132150
1. On the **Review** tab, replace the following placeholder text in the YAML code:
133151
@@ -286,54 +304,6 @@ In this tutorial, you'll reconfigure the sample application to accept only secur
286304
287305
The Azure Load Testing task securely passes the secret from the pipeline to the test engine. The secret parameter is used only while you're running the load test, and then the value is discarded from memory.
288306
289-
## Configure and use the Azure Load Testing task
290-
291-
This section describes the Azure Load Testing task for Azure Pipelines. The task is cross-platform and runs on Windows, Linux, or Mac agents.
292-
293-
You can use the following parameters to configure the Azure Load Testing task:
294-
295-
|Parameter |Description |
296-
|---------|---------|
297-
|`azureSubscription` | *Required*. Name of the Azure Resource Manager service connection. |
298-
|`loadTestConfigFile` | *Required*. Path to the YAML configuration file for the load test. The path is fully qualified or relative to the default working directory. |
299-
|`resourceGroup` | *Required*. Name of the resource group that contains the Azure Load Testing resource. |
300-
|`loadTestResource` | *Required*. Name of an existing Azure Load Testing resource. |
301-
|`secrets` | Array of JSON objects that consist of the name and value for each secret. The name should match the secret name used in the Apache JMeter test script. |
302-
|`env` | Array of JSON objects that consist of the name and value for each environment variable. The name should match the variable name used in the Apache JMeter test script. |
303-
304-
The following YAML code snippet describes how to use the task in an Azure Pipelines CI/CD workflow:
305-
306-
```yaml
307-
- task: AzureLoadTest@1
308-
inputs:
309-
azureSubscription: '<Azure service connection>'
310-
loadTestConfigFile: '< YAML File path>'
311-
loadTestResource: '<name of the load test resource>'
312-
resourceGroup: '<name of the resource group of your load test resource>'
313-
secrets: |
314-
[
315-
{
316-
"name": "<Name of the secret>",
317-
"value": "$(mySecret1)"
318-
},
319-
{
320-
"name": "<Name of the secret>",
321-
"value": "$(mySecret1)"
322-
}
323-
]
324-
env: |
325-
[
326-
{
327-
"name": "<Name of the variable>",
328-
"value": "<Value of the variable>"
329-
},
330-
{
331-
"name": "<Name of the variable>",
332-
"value": "<Value of the variable>"
333-
}
334-
]
335-
```
336-
337307
## Clean up resources
338308
339309
[!INCLUDE [alt-delete-resource-group](../../includes/alt-delete-resource-group.md)]
@@ -342,5 +312,7 @@ The following YAML code snippet describes how to use the task in an Azure Pipeli
342312
343313
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.
344314
345-
* For more information about parameterizing load tests, see [Parameterize a load test](./how-to-parameterize-load-tests.md).
346-
* For more information about defining test pass/fail criteria, see [Define test criteria](./how-to-define-test-criteria.md).
315+
* Learn more about the [Azure Load Testing task](/azure/devops/pipelines/tasks/test/azure-load-testing?view=azure-devops).
316+
* Learn more about [Parameterizing a load test](./how-to-parameterize-load-tests.md).
317+
* Learn more [Define test pass/fail criteria](./how-to-define-test-criteria.md).
318+
* Learn more about [Configuring server-side monitoring](./how-to-monitor-server-side-metrics.md).

0 commit comments

Comments
 (0)