Skip to content

Commit abc1964

Browse files
Update quickstart-create-run-load-test-with-locust.md
Adding steps to use multiple files and requirements.txt
1 parent 917dd37 commit abc1964

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

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

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,19 @@ 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-
> [!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**
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+
```
90+
8091
1. On the **Load** tab, enter the details for the amount of load to generate:
8192

8293
|Field |Description |

0 commit comments

Comments
 (0)