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/concept-load-testing-concepts.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -124,6 +124,8 @@ A test engine is computing infrastructure, managed by Microsoft that runs the te
124
124
125
125
The test engines are hosted in the same location as your Azure Load Testing resource. You can configure the Azure region when you create the Azure load testing resource.
126
126
127
+
Azure Load Testing uses Standard_D4d_v4 size Virtual Machines with four vCPUs, 16GB Memory and Azure Linux operating system as the test engines. For JMeter based tests, the test engines use JDK 21 and Apache JMeter version 5.6.3. For Locust based tests, the test engines use Python 3.9.19 and Locust version 2.33.2.
128
+
127
129
While the test script runs, Azure Load Testing collects and aggregates the testing framework logs from all test engine instances. You can [download the logs for analyzing errors during the load test](./how-to-diagnose-failing-load-test.md).
Copy file name to clipboardExpand all lines: articles/load-testing/quickstart-create-run-load-tests-from-visual-studio-code.md
+14-16Lines changed: 14 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: 'Quickstart: Create and run load tests from Visual Studio Code'
3
3
titleSuffix: Azure Load Testing
4
-
description: 'This quickstart shows how to create and run load tests using the Visual Studio code extension for Azure Load Testing. Azure Load Testing is a managed, cloud-based load testing tool.'
4
+
description: 'This quickstart shows how to create and run load tests using the Visual Studio Code extension for Azure Load Testing. Azure Load Testing is a managed, cloud-based load testing tool.'
5
5
services: load-testing
6
6
ms.service: azure-load-testing
7
7
ms.topic: quickstart
@@ -10,11 +10,11 @@ ms.author: vevippar
10
10
ms.date: 04/04/2024
11
11
---
12
12
13
-
# Quickstart: Create and run a load test from Visual Studio Code with Azure Load Testing
13
+
# Quickstart: Create and run a load test with Visual Studio Code and GitHub Copilot
14
14
15
15
Learn how to use the Azure Load Testing extension for Visual Studio Code to easily create Locust load tests using Copilot, iterate locally, and scale effortlessly in Azure. Whether you're new to Locust or a performance testing expert, the Azure Load Testing extension streamlines test creation, iteration, and scaling, right from your VS Code environment. Azure Load Testing is a managed service that lets you run a load test at cloud scale. [Locust](https://locust.io/) is an open source load testing tool that enables you to describe all your test in Python code.
16
16
17
-
This quickstart guides you through generating, refining, and running realistic load tests. By the end, you'll have a fully functional load test script generated from a **Postman collection**, **Insomnia collection**, or **.http file**, enhanced with Copilot-powered improvements, and ready to scale in **Azure Load Testing**.
17
+
This quickstart guides you through generating, refining, and running realistic load tests. By the end, you have a fully functional load test script generated from a **Postman collection**, **Insomnia collection**, or **.http file**, enhanced with Copilot-powered improvements, and ready to scale in **Azure Load Testing**.
18
18
19
19
:::image type="content" source="./media/quickstart-create-run-load-tests-from-visual-studio-code/create-locust-test.gif" alt-text="Image sequence that shows the creation of a Locust script using Azure Load Testing VS Code extension" lightbox="./media/quickstart-create-run-load-tests-from-visual-studio-code/create-locust-test.gif":::
20
20
@@ -43,7 +43,7 @@ You can also access the features directly from the command palette by using the
43
43
44
44
## Generate a Locust script with Copilot
45
45
46
-
You can generate a Locust script from any existing Postman collection, Insomnia collection, or .http file. If the file contains multiple requests, Copilot will attempt to sequence them into a cohesive scenario.
46
+
You can generate a Locust script from any existing Postman collection, Insomnia collection, or .http file. If the file contains multiple requests, Copilot attempts to sequence them into a cohesive scenario.
47
47
48
48
1. For this quickstart, download and save the [sample PetStore .http file](https://aka.ms/malt-vscode/http-sample) in your current VS Code workspace.
49
49
@@ -59,9 +59,9 @@ You can generate a Locust script from any existing Postman collection, Insomnia
59
59
60
60
1. Select the sample file which you saved earlier to your workspace: [**`petstore-sample.http`**](https://aka.ms/malt-vscode/http-sample).
61
61
62
-
1. Copilot will analyze the selected file and generate a **Locust-based load test script**, automatically sequencing API requests to simulate real-world usage and handling authentication securely.
62
+
1. Copilot analyzes the selected file and generate a **Locust-based load test script**, automatically sequencing API requests to simulate real-world usage and handling authentication securely.
63
63
64
-
1. Once the script is generated, the **Copilot Chat** window will suggest additional setup steps, such as defining **environment variables**. If Copilot suggests environment variables, create a `.env` file in your project and add the recommended values.
64
+
1. Once the script is generated, the **Copilot Chat** window will suggest other setup steps, such as defining **environment variables**. If Copilot suggests environment variables, create a `.env` file in your project and add the recommended values.
65
65
66
66
## Customize the load test script
67
67
@@ -82,12 +82,12 @@ To make the test more dynamic by randomizing the request payload:
82
82
83
83
1. Open the **Copilot Chat** panel.
84
84
2. Type: `Randomize request payloads` and press Enter.
85
-
3. Copilot will generate a suggested modification to introduce randomization.
85
+
3. Copilot generates a suggested modification to introduce randomization.
86
86
4. Click **Apply in Editor** that appears above the generated code snippet in Copilot Chat window.
87
87
5. After reviewing the changes, click **Keep** to accept and update your script.
88
88
6. Save the file
89
89
90
-
Now, each request simulates a more realistic user interaction. The code will look something like the following:
90
+
Now, each request simulates a more realistic user interaction. The code looks something like the following snippet:
91
91
92
92
```python
93
93
payload = {
@@ -111,9 +111,9 @@ To quickly validate your test, run it locally using Locust from **Visual Studio
111
111
112
112
1. Open the command palette and run: **Load Testing: Run load test (local)**.
113
113
114
-
1.This will automatically launch the **Locust web UI** in a browser. It can take a few seconds for the Locust server to be ready and for the browser to open.
114
+
1.The **Locust web UI** gets automatically launched in a browser. It can take a few seconds for the Locust server to be ready and for the browser to open.
115
115
116
-
1. In the **Start new load test** page, review the input fields and click **Start**. Locust will begin sending requests, logging any failures, and tracking performance statistics.
116
+
1. In the **Start new load test** page, review the input fields and click **Start**. Locust starts sending requests, logging any failures, and tracking performance statistics.
117
117
118
118
:::image type="content" source="./media/quickstart-create-run-load-tests-from-visual-studio-code/locust-start-new-load-test.png" alt-text="Screenshot that shows the Locust web UI to run a load test locally." lightbox="./media/quickstart-create-run-load-tests-from-visual-studio-code/locust-start-new-load-test.png":::
119
119
@@ -135,7 +135,7 @@ If you prefer running the test from a **VS Code Terminal**:
135
135
```
136
136
*`-f path/to/locustfile.py`: Specifies the Locust test script.
137
137
*`-u 10`: Simulates up to 10 virtual users.
138
-
*`-r 2`: Ramps up 2 virtual users per second.
138
+
*`-r 2`: Ramps up two virtual users per second.
139
139
*`--run-time 1m`: Runs the testfor 1 minute.
140
140
1. Open a browser to `http://0.0.0.0:8089` to view the Locust web UI.
141
141
@@ -156,8 +156,8 @@ To execute a large-scale test:
156
156
157
157
- Choosing load test regions to distribute traffic globally.
158
158
159
-
1. Once the setup is complete, a YAML configuration file (e.g., `loadtest.config.yaml`) is generated and added to your workspace root folder.
160
-
- This file defines the Locust script, load parameters, environment variables, regions, and any additional files (e.g., CSV datasets).
159
+
1. Once the setup is complete, a YAML configuration file (for example, `loadtest.config.yaml`) is generated and added to your workspace root folder.
160
+
- This file defines the Locust script, load parameters, environment variables, regions, and any other files (for example, CSV datasets).
161
161
162
162
- Defaults are 200 virtual users running for120 secondsin each selected region.
163
163
@@ -172,10 +172,8 @@ To execute a large-scale test:
172
172
> [!NOTE]
173
173
> To quickly access test results from previous runs, use the command: **Load Testing: View load test runs**.
:::image type="content" source="./media/quickstart-create-run-load-tests-from-visual-studio-code/run-load-test-azure.gif" alt-text="Image sequence that shows the test results dashboard in Azure Load Testing." lightbox="./media/quickstart-create-run-load-tests-from-visual-studio-code/run-load-test-azure.gif":::
177
176
178
-
179
177
## Next Steps
180
178
181
179
So far in this quickstart, sensitive variables like `API_KEY` were stored in a `.env` file and uploaded to the cloud service. However, as a best practice, secrets should be securely managed in**Azure Key Vault**. The extension provides guidance on setting this up.
@@ -184,7 +182,7 @@ So far in this quickstart, sensitive variables like `API_KEY` were stored in a `
184
182
185
183
1. Open the **Copilot Chat** window, type`@testing /setupLoadTestSecretsInAzure` and hit Enter.
186
184
187
-
1. Copilot will guide you through:
185
+
1. Copilot guides you through:
188
186
- Creating an Azure Key Vault.
189
187
- Assigning a managed identity to your Azure Load Testing resource.
0 commit comments