Skip to content

Commit 83d5224

Browse files
Docs update for supporting Locust in ALT
1 parent 684fea3 commit 83d5224

23 files changed

+225
-101
lines changed

articles/load-testing/concept-load-testing-concepts.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,22 @@ A virtual user runs a particular test case against your server application and r
2424

2525
Apache JMeter also refers to virtual users as *threads*. In the JMeter test script, a *thread group* element lets you specify the pool of virtual users. Learn about [thread groups](https://jmeter.apache.org/usermanual/test_plan.html#thread_group) in the Apache JMeter documentation.
2626

27+
Locust refers to virtual users as *users*. You can specify the users needed for your test in the web interface, as a command line argument, through an environment variable or through a configuration file. Learn about [configuration options](https://docs.locust.io/en/stable/configuration.html) in the Locust documentation.
28+
2729
The total number of virtual users for your load test depends on the number of virtual users in the test script and the number of [test engine instances](#test-engine).
2830

29-
The formula is: Total virtual users = (virtual users in the JMX file) * (number of test engine instances).
31+
For JMeter based load tests, the formula is: Total virtual users = (virtual users in the JMX file) * (number of test engine instances).
3032

3133
You can achieve the target number of virtual users by [configuring the number of test engine instances](./how-to-high-scale-load.md#test-engine-instances-and-virtual-users), the number of virtual users in the test script, or a combination of both.
3234

35+
For Locust based load tests, the total number of virtual users is the number of users specified through any of the configuration options. You can then [configure the number of test engine instances](./how-to-high-scale-load.md#test-engine-instances-and-virtual-users) required to generate the total number of users.
36+
3337
### Ramp-up time
3438

3539
The ramp-up time is the amount of time to get to the full number of [virtual users](#virtual-users) for the load test. If the number of virtual users is 20, and the ramp-up time is 120 seconds, then it takes 120 seconds to get to all 20 virtual users. Each virtual user will start 6 (120/20) seconds after the previous user was started.
3640

41+
For Locust, you can specify this using *spawn rate*. Spawn rate is the number of users added per second. If the number of users is 20 and the spawn rate is 2, 2 users will get added every second and it takes 10 seconds to get to all the 20 users.
42+
3743
### Response time
3844

3945
The response time of an individual request, or [elapsed time in JMeter](https://jmeter.apache.org/usermanual/glossary.html), is the total time from just before sending the request to just after the last response is received. The response time doesn't include the time to render the response. Any client code, such as JavaScript, isn't processed during the load test.
@@ -72,7 +78,7 @@ To run a load test for your application, you add a [test](#test) to your load te
7278

7379
You can use [Azure role-based access control](./how-to-assign-roles.md) to grant access to your load testing resource and related artifacts.
7480

75-
Azure Load Testing lets you [use managed identities](./how-to-use-a-managed-identity.md) to access Azure Key Vault for storing [load test secret parameters or certificates](./how-to-parameterize-load-tests.md). You can use either a user-assigned or system-assigned managed identity.
81+
Azure Load Testing lets you [use managed identities](./how-to-use-a-managed-identity.md) to access Azure Key Vault for storing [load test secret parameters or certificates](./how-to-parameterize-load-tests.md), to access Azure monitor metrics for configuring failure criteria or to simulate managed identity based authentication flows. You can use either a user-assigned or system-assigned managed identity.
7682

7783
### Test
7884

@@ -84,7 +90,7 @@ A test contains a test plan, which describes the steps to invoke the application
8490
- [Upload a Locust test script](./quickstart-create-run-load-test-with-locust.md).
8591
- [Specify the list of URL endpoints to test](./quickstart-create-and-run-load-test.md).
8692

87-
Azure Load Testing supports all communication protocols that JMeter supports, not only HTTP-based endpoints. For example, you might want to read from or write to a database or message queue in the test script.
93+
Azure Load Testing supports all communication protocols that JMeter and Locust support, not only HTTP-based endpoints. For example, you might want to read from or write to a database or message queue in the test script.
8894

8995
Azure Load Testing currently does not support other testing frameworks than Apache JMeter and Locust.
9096

@@ -134,7 +140,7 @@ During a load test, Azure Load Testing collects metrics about the test execution
134140

135141
- *Client-side metrics* are reported by the test engines. These metrics include the number of virtual users, the request response time, the number of failed requests, or the number of requests per second. You can [define test fail criteria](./how-to-define-test-criteria.md) based on these client-side metrics.
136142

137-
- *Server-side metrics* are available for Azure-hosted applications and provide information about your Azure [application components](#app-component). Azure Load Testing integrates with Azure Monitor, including Application Insights and Container insights, to capture details from the Azure services. Depending on the type of service, different metrics are available. For example, metrics can be for the number of database reads, the type of HTTP responses, or container resource consumption.
143+
- *Server-side metrics* are available for Azure-hosted applications and provide information about your Azure [application components](#app-component). Azure Load Testing integrates with Azure Monitor, including Application Insights and Container insights, to capture details from the Azure services. Depending on the type of service, different metrics are available. For example, metrics can be for the number of database reads, the type of HTTP responses, or container resource consumption. You can [define test fail criteria](./how-to-define-test-criteria.md) based on these server-side metrics also.
138144

139145
## Related content
140146

articles/load-testing/how-to-configure-customer-managed-keys.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Azure Load Testing uses the customer-managed key to encrypt the following data i
2525
- Environment variables
2626

2727
> [!NOTE]
28-
> Azure Load Testing does not encrypt metrics data for a test run with your customer-managed key, including the JMeter metrics sampler names that you specify in the JMeter script. Microsoft has access to this metrics data.
28+
> Azure Load Testing does not encrypt metrics data for a test run with your customer-managed key, including the JMeter metrics sampler names that you specify in the JMeter script and the request names that you specify in the Locust script. Microsoft has access to this metrics data.
2929
3030
## Prerequisites
3131

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ You can automate a load test in Azure Load Testing by creating a CI/CD pipeline.
1717
To add an existing load test to a CI/CD pipeline:
1818

1919
- Configure service authentication to allow the CI tool to connect to your Azure load testing resource.
20-
- Add load test input files to your repository, such as the JMeter test script and the load test YAML configuration.
20+
- Add load test input files to your repository, such as the test script and the load test YAML configuration.
2121
- Update the CI/CD pipeline definition to invoke Azure Load Testing.
2222

2323
## Prerequisites
2424

2525
- An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
26-
- 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.
26+
- An Azure Load Testing test. Create a [URL-based load test](./quickstart-create-and-run-load-test.md), use [an existing JMeter script](./how-to-create-and-run-load-test-with-jmeter-script.md) or [an existing Locust script](./quickstart-create-run-load-test-with-locust.md) to create a load test.
2727

2828
# [Azure Pipelines](#tab/pipelines)
2929
- 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).
@@ -224,7 +224,7 @@ To run a load test with Azure Load Testing in a CI/CD workflow, you need to add
224224
If you don't have an existing load test, add the following files to your source code repository:
225225
226226
- Load test configuration YAML file. Learn how you can create a [load test configuration YAML file](./reference-test-config-yaml.md).
227-
- Test plan file. For JMeter-based tests, add a JMeter test script (`JMX` file). For URL-based tests, add a [requests JSON file](./reference-test-config-yaml.md#requests-json-file).
227+
- Test plan file. For JMeter-based tests, add a JMeter test script (`JMX` file). For Locust-based tests, add a Locust test script (`.py` file). For URL-based tests, add a [requests JSON file](./reference-test-config-yaml.md#requests-json-file).
228228
- Any [JMeter user properties files](./how-to-configure-user-properties.md).
229229
- Any input data files that your test plan uses. For example, CSV data files.
230230
@@ -247,7 +247,7 @@ If you have an existing load test, you can download the configuration settings a
247247
The folder contains the following files:
248248
249249
- `config.yaml`: the load test YAML configuration file. You reference this file in the CI/CD workflow definition.
250-
- `.jmx`: the JMeter test script
250+
- `.jmx` or `.py`: The JMeter or Locust test script
251251
- Any additional input files, such as CSV files or user properties files that are needed to run the load test.
252252
253253
1. Commit all extracted input files to your source control repository.

articles/load-testing/how-to-create-manage-test-runs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ Test runs are associated with a load test in Azure Load Testing. To view the tes
3535

3636
:::image type="content" source="media/how-to-create-manage-test-runs/test-run-context-menu.png" alt-text="Screenshot that shows the test run context menu in the Azure portal to download input files, results file, and share a link.":::
3737

38-
- Select **Download input file** to download all input files for running the test, such as the JMeter test script, input data files, and user property files. The download also contains the [load test configuration YAML file](./reference-test-config-yaml.md).
38+
- Select **Download input file** to download all input files for running the test, such as the test script, input data files, and user property files. The download also contains the [load test configuration YAML file](./reference-test-config-yaml.md).
3939

4040
> [!TIP]
4141
> You can use the downloaded test configuration YAML file for [setting up automated load testing in a CI/CD pipeline](./how-to-configure-load-test-cicd.md).
4242

43-
- Select **Download results file** to download the JMeter test results CSV file. This file contains an entry for each web request. Learn more about [exporting load test results](./how-to-export-test-results.md).
43+
- Select **Download results file** to download the test results CSV file. This file contains an entry for each web request. Learn more about [exporting load test results](./how-to-export-test-results.md).
4444

4545
- Select **Share** to get a direct link to the test run dashboard in the Azure portal. To view the test run dashboard, you need to have access granted to the load testing resource. Learn more about [users and roles in Azure Load Testing](./how-to-assign-roles.md).
4646

articles/load-testing/how-to-create-manage-test.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Learn how to create and manage [load tests](./concept-load-testing-concepts.md#t
2525
There are two options to create a load test in the Azure portal:
2626

2727
- Create a quick test by using a web application URL (URL-based test).
28-
- Create a test by uploading a JMeter test script (JMX).
28+
- Create a test by uploading a test script (JMX). You can upload a JMeter script or a Locust script.
2929

3030
:::image type="content" source="media/how-to-create-manage-test/create-test-dropdown.png" alt-text="Screenshot that shows the options to create a new test in the Azure portal.":::
3131

@@ -46,9 +46,9 @@ To create a quick test in the Azure portal:
4646

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

49-
1. Select **Quick test** on the **Overview** page.
49+
1. Select **Add HTTP requests** on the **Overview** page.
5050

51-
Alternately, select **Tests** in the left pane, select **+ Create**, and then select **Create a quick test**.
51+
Alternately, select **Tests** in the left pane, select **+ Create**, and then select **Create a URL-based test**.
5252

5353
1. Enter the target URL and load parameters.
5454

@@ -60,17 +60,17 @@ To create a quick test in the Azure portal:
6060

6161
After running a quick test, you can further [edit the load test configuration](#edit-a-test). For example, you can add app components to [monitor server-side metrics](./how-to-monitor-server-side-metrics.md), [configure high scale load](./how-to-high-scale-load.md), or to edit the generated JMeter script.
6262

63-
### Create a test by using a JMeter script
63+
### Create a test by using a test script
6464

65-
To reuse an existing JMeter test script, or for more advanced test scenarios, create a test by uploading a JMX file. For example, to [read data from a CSV input file](./how-to-read-csv-data.md), or to [configure JMeter user properties](./how-to-configure-user-properties.md). For more information, see [Create a load test by using an existing JMeter script](./how-to-create-and-run-load-test-with-jmeter-script.md).
65+
To reuse an existing JMeter or Locust test script, or for more advanced test scenarios, create a test by uploading the test script. For example, to [read data from a CSV input file](./how-to-read-csv-data.md), or to [configure JMeter user properties](./how-to-configure-user-properties.md). For more information, see [Create a load test by using an existing JMeter script](./how-to-create-and-run-load-test-with-jmeter-script.md) and [Create a load test with a Locust script](./quickstart-create-run-load-test-with-locust.md).
6666

67-
If you're not familiar with creating a JMeter script, see [Getting started with Apache JMeter](https://jmeter.apache.org/usermanual/get-started.html).
67+
If you're not familiar with creating a JMeter script, see [Getting started with Apache JMeter](https://jmeter.apache.org/usermanual/get-started.html). To get started with Locust, see [Getting started with Locust](https://docs.locust.io/en/stable/quickstart.html)
6868

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

7171
1. Select **Create** on the **Overview** page.
7272

73-
Alternately, select **Tests** in the left pane, select **+ Create**, and then select **Upload a JMeter script**.
73+
Alternately, select **Tests** in the left pane, select **+ Create**, and then select **Upload scripts**.
7474

7575
1. On the **Basics** page, enter the basic test information.
7676

@@ -80,7 +80,7 @@ If you're not familiar with creating a JMeter script, see [Getting started with
8080

8181
#### Test plan
8282

83-
The test plan contains all files that are needed for running your load test. At a minimum, the test plan should contain one `*.jmx` JMeter script. Azure Load Testing only supports one JMX file per load test.
83+
The test plan contains all files that are needed for running your load test. At a minimum, the test plan should contain one `*.jmx` JMeter script or one `.py` Locust script.
8484

8585
Alongside the test script, you can upload a user property file, configuration files, or input data files, such as CSV files.
8686

@@ -90,7 +90,7 @@ Alongside the test script, you can upload a user property file, configuration fi
9090

9191
:::image type="content" source="media/how-to-create-manage-test/test-plan-upload-files.png" alt-text="Screenshot that shows the test plan page for creating a test in the Azure portal, highlighting the upload functionality.":::
9292

93-
Azure Load Testing stores all files in a single repository. If your test script references configuration or data files, make sure to remove any relative path names in the JMX file.
93+
Azure Load Testing stores all files in a single repository. If your test script references configuration or data files, make sure to remove any relative path names in the test script.
9494

9595
1. If your test uses CSV input data, you can choose to enable **Split CSV evenly between test engines**.
9696

@@ -105,7 +105,7 @@ Alongside the test script, you can upload a user property file, configuration fi
105105
106106
#### Parameters
107107

108-
You can use parameters to make your test plan configurable instead of hard-coding values in the JMeter script. Specify key-value pairs in the load test configuration, and reference the value in the JMeter script by using the parameter name. For more information, see [Parameterize a load test with environment variables and secrets](./how-to-parameterize-load-tests.md).
108+
You can use parameters to make your test plan configurable instead of hard-coding values in the test script. Specify key-value pairs in the load test configuration, and reference the value in the test script by using the parameter name. For more information, see [Parameterize a load test with environment variables and secrets](./how-to-parameterize-load-tests.md).
109109

110110
:::image type="content" source="media/how-to-create-manage-test/configure-parameters.png" alt-text="Screenshot that shows how to configure parameters when creating a test in the Azure portal.":::
111111

@@ -133,7 +133,7 @@ You can use parameters to make your test plan configurable instead of hard-codin
133133

134134
1. Specify the number of test engine instances.
135135

136-
Azure Load Testing automatically scales your load test across all instances. The JMeter test script is run in parallel across all instances. The total number of simulated users equals the number of virtual users (threads) you specify in the JMeter script, multiplied by the number of test engine instances. For more information, see [Configure a test for high-scale load](./how-to-high-scale-load.md).
136+
Azure Load Testing automatically scales your load test across all instances. The JMeter test script is run in parallel across all instances. The total number of simulated users equals the number of virtual users (threads) you specify in the JMeter script, multiplied by the number of test engine instances. For Locust-based tests, specify the total users required in the load configuration in Azure Load Testing, in the test script, or in the Locust configuration file and select the engine instances required to generate the load. For more information, see [Configure a test for high-scale load](./how-to-high-scale-load.md).
137137

138138
1. Configure virtual network connectivity.
139139

@@ -155,7 +155,7 @@ You can use parameters to make your test plan configurable instead of hard-codin
155155
- Latency
156156
- Error percentage
157157

158-
You can specify fail criteria for the entire load test, or assign them to specific requests in the JMeter script. For example, to validate that the home page response time doesn't exceed a specific response time. For more information, see [Configure test fail criteria](./how-to-define-test-criteria.md).
158+
You can specify fail criteria for the entire load test, or assign them to specific requests in the test script. For example, to validate that the home page response time doesn't exceed a specific response time. For more information, see [Configure test fail criteria](./how-to-define-test-criteria.md).
159159

160160
1. Configure auto stop criteria.
161161

0 commit comments

Comments
 (0)