Skip to content

Commit aca3e4c

Browse files
committed
Add parameterize section
1 parent b56bf62 commit aca3e4c

File tree

2 files changed

+23
-11
lines changed

2 files changed

+23
-11
lines changed

articles/load-testing/concept-load-test-app-service.md

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -101,21 +101,33 @@ App Service diagnostics enables you to view in-depth information and dashboard a
101101
102102
## Parameterize your test for deployment slots
103103

104-
- Requires a JMeter script
105-
- Deployment slots -> different endpoint
106-
- Avoid hard-coding
107-
- Use env vars to pass deployment slot and make URL configurable in JMeter script
108-
- Also use for other configuration parameters (for example, number of virtual users, ramp-up time, and so on.)
104+
[Azure App Service deployment slots](/azure/app-service/deploy-staging-slots) enable you to set up staging environments for your application. Each deployment slot has a separate URL. You can easily reuse your load testing script across multiple slots by using environment variables in the load test configuration.
109105

110-
## Authenticated endpoints
106+
When you create a quick test, Azure Load Testing generates a generic JMeter script and uses environment variables to pass the target URL to the script.
111107

112-
- Use shared secrets or certificates
113-
- Pass secrets into the JMeter script (store in Azure Key Vault or in CI/CD secrets store)
114-
- [Azure AD authentication config](/azure/app-service/configure-authentication-provider-aad)
115-
- [Blog post](https://techcommunity.microsoft.com/t5/apps-on-azure-blog/authentication-with-azure-load-testing-series-azure-active/ba-p/3718002)
108+
:::image type="content" source="media/concept-load-test-app-service/quick-test-parameters.png" alt-text="Screenshot that shows the Parameters page of a quick test in the Azure portal, highlighting the parameters for the target URL." lightbox="media/concept-load-test-app-service/quick-test-parameters.png":::
109+
110+
To use environment variables for passing the deployment slot URL to your JMeter test script, perform the following steps:
111+
112+
1. Add an environment variable in the load test configuration.
113+
114+
1. Reference the environment variable in your test script by using the `System.getenv` function.
115+
116+
```xml
117+
<elementProp name="domain" elementType="Argument">
118+
<stringProp name="Argument.name">domain</stringProp>
119+
<stringProp name="Argument.value">${__BeanShell( System.getenv("domain") )}</stringProp>
120+
<stringProp name="Argument.metadata">=</stringProp>
121+
</elementProp>
122+
```
123+
124+
Learn how to [parameterize a load test by using environment variables](./how-to-parameterize-load-tests.md).
125+
126+
You can also use environment variables to pass other configuration settings to the JMeter test script. For example, you might pass the number of virtual users, or the file name of a [CSV input file](./how-to-read-csv-data.md) to the test script.
116127

117128
## Next steps
118129

130+
- Get started by [creating a URL-based load test](./quickstart-create-and-run-load-test.md).
131+
- Learn how to [identify performance bottlenecks](./tutorial-identify-bottlenecks-azure-portal.md) for Azure applications.
119132
- Learn how to [configure your test for high-scale load](./how-to-high-scale-load.md).
120133
- Learn how to [configure automated performance testing](./tutorial-identify-performance-regression-with-cicd.md).
121-
- Learn how to [identify performance bottlenecks](./tutorial-identify-bottlenecks-azure-portal.md) for Azure applications.
45.5 KB
Loading

0 commit comments

Comments
 (0)