Skip to content

Commit 9bad038

Browse files
Merge pull request #288690 from Nagarjuna-Vipparthi/patch-20
Update quickstart-create-run-load-test-with-locust.md
2 parents 4ddfdca + 3ea90c0 commit 9bad038

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

articles/load-testing/quickstart-create-run-load-test-with-locust.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,21 @@ To create a load test for a Locust-based test in the Azure portal:
7575

7676
:::image type="content" source="./media/quickstart-create-and-run-load-test-with-locust/create-new-test-test-plan.png" alt-text="Screenshot that shows the button for uploading test artifacts." lightbox="./media/quickstart-create-and-run-load-test-with-locust/create-new-test-test-plan.png":::
7777

78+
1. Upload any other files that you reference in the test script. For example, if your test script uses CSV data sets, you can upload the corresponding *.csv* file(s). To use a configuration file with your Locust script, upload the file and select **Locust configuration** as the **File relevance**
79+
80+
1. To install any dependencies from a 'requirements.txt' file, upload the 'requirements.txt' file along with the other artifacts. Add this code in your Locust script to install the dependencies
81+
```Python
82+
import subprocess
83+
subprocess.check_output("python3 -m pip install -r requirements.txt", shell=True)
84+
```
85+
1. To use supporting Python files along with your Locust, create a wheel (.whl) file of the supporting Python files and upload the wheel file along with the other artifacts. Add this code in your Locust script to install the wheel file during Locust startup
86+
```Python
87+
import subprocess
88+
subprocess.check_output("python3 -m pip install your_wheel.whl", shell=True)
89+
```
7890
> [!NOTE]
79-
> You can also upload other files that you reference in the test script. For example, if your test script uses CSV data sets, you can upload the corresponding *.csv* file(s). To use a configuration file with your Locust script, upload the file and select **Locust configuration** as the **File relevance**
91+
> Include the code snippets to install dependencies and supporting files in the import section of your Locust script. Do not include these in the load test section.
92+
8093
1. On the **Load** tab, enter the details for the amount of load to generate:
8194

8295
|Field |Description |

0 commit comments

Comments
 (0)