You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/load-testing/tutorial-cicd-azure-pipelines.md
+81-1Lines changed: 81 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -277,6 +277,86 @@ To create and run the load test, the Azure Pipelines definition uses the [Azure
277
277
278
278
# [GitHub Actions](#tab/github)
279
279
280
+
You'll create a GitHub Actions workflow in your fork of the sample application repository. This repository contains the following items:
281
+
282
+
- The sample application source code.
283
+
- The *.github/workflows/workflow.yml* GitHub Actions workflow.
284
+
- The *SampleApp.jmx* JMeter test script.
285
+
- The *SampleApp.yaml* Azure Load Testing configuration file.
286
+
287
+
To create and run the load test, the GitHub Actions workflow uses the [Azure Load Testing Action](https://github.com/marketplace/actions/azure-load-testing) from the GitHub Actions Marketplace.
288
+
289
+
The sample application repository already contains a sample workflow file *.github/workflows/workflow.yml*. The GitHub Actions workflow performs the following steps for every update to the main branch:
290
+
291
+
292
+
- Invoke Azure Load Testing by using the [Azure Load Testing Action](https://github.com/marketplace/actions/azure-load-testing) and the sample Apache JMeter script *SampleApp.jmx* and the load test configuration file *SampleApp.yaml*.
293
+
294
+
1. Open the *.github/workflows/workflow.yml* GitHub Actions workflow file in your sample application's repository.
295
+
296
+
1. Notice the `loadTest` job, which creates and runs the load test:
297
+
298
+
- The `azure/login` action authenticates with Azure, by using the `AZURE_CREDENTIALS` secret to pass the service principal credentials.
299
+
300
+
```yml
301
+
- name: Login to Azure
302
+
uses: azure/login@v1
303
+
continue-on-error: false
304
+
with:
305
+
creds: ${{ secrets.AZURE_CREDENTIALS }}
306
+
```
307
+
308
+
- The `azure/arm-deploy` action deploys a new Azure load testing resource in your Azure subscription.
- The `azure/load-testing` [Azure Load Testing Action](https://github.com/marketplace/actions/azure-load-testing) creates and starts a load test. This action uses the `SampleApp.yaml` [load test configuration file](./reference-test-config-yaml.md), which contains the configuration parameters for the load test, such as the number of parallel test engines.
If a load test already exists, the `azure/load-testing` action won't create a new load test, but will add a test run to this load test. To identify regressions over time, you can then [compare multiple test runs](./how-to-compare-multiple-test-runs.md).
338
+
339
+
1. Replace the following placeholder text at the beginning of the workflow definition file:
340
+
341
+
These variables are used to configure the deployment of the sample application, and to create the load test.
342
+
343
+
|Placeholder |Value |
344
+
|---------|---------|
345
+
|`<Name of your webapp>` | The name of the Azure App Service web app. |
346
+
|`<Name of your load test resource>` | The name of your Azure Load Testing resource. |
347
+
|`<Name of your load test resource group>` | The name of the resource group that contains the Azure Load Testing resource. |
348
+
349
+
```yaml
350
+
env:
351
+
AZURE_WEBAPP_NAME: "<Name of your webapp>" # set this to your application's name
352
+
LOAD_TEST_RESOURCE: "<Name of your load test resource>"
353
+
LOAD_TEST_RESOURCE_GROUP: "<Name of your load test resource group>"
354
+
```
355
+
356
+
1. Commit your changes to the main branch.
357
+
358
+
The commit will trigger the GitHub Actions workflow in your repository. Verify that the workflow is running by going to the **Actions** tab.
359
+
280
360
---
281
361
282
362
## View load test results
@@ -295,7 +375,7 @@ To view the results of the load test in the pipeline log:
295
375
296
376
After the load test finishes, you can view the test summary information and the client-side metrics in the pipeline log. The log also shows the URL to go to the Azure Load Testing dashboard for this load test.
297
377
298
-
2. In the pipeline log view, select **Load Test**, and then select **1 artifact produced** to download the result files for the load test.
378
+
1. In the pipeline log view, select **Load Test**, and then select **1 artifact produced** to download the result files for the load test.
299
379
300
380
:::image type="content" source="./media/tutorial-cicd-azure-pipelines/create-pipeline-download-results.png" alt-text="Screenshot that shows how to download the load test results.":::
0 commit comments