Skip to content

Commit 3bdfc5e

Browse files
committed
Use code sample refs for reading from CSV
1 parent 04da311 commit 3bdfc5e

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

articles/load-testing/how-to-read-csv-data.md

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ In this article, you'll learn how to read data from a comma-separated value (CSV
1818

1919
Use data from an external CSV file to make your JMeter test script configurable. For example, you might invoke an API for each entry in a customers CSV file.
2020

21+
Get started by [cloning or downloading the samples project from GitHub](https://github.com/Azure-Samples/azure-load-testing-samples/tree/main/jmeter-read-csv).
22+
2123
In this article, you learn how to:
2224

2325
> [!div class="checklist"]
@@ -62,21 +64,11 @@ To edit your JMeter script by using Visual Studio Code or your editor of prefere
6264

6365
1. Update the `filename` element and remove any file path reference.
6466

67+
:::code language="xml" source="~/azure-load-testing-samples/jmeter-read-csv/read-from-csv.jmx" range="30-41" highlight="4":::
68+
6569
1. Add the CSV field names as a comma-separated list in `variableNames`.
6670

67-
```xml
68-
<CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="Search parameters" enabled="true">
69-
<stringProp name="delimiter">,</stringProp>
70-
<stringProp name="fileEncoding">UTF-8</stringProp>
71-
<stringProp name="filename">search-params.csv</stringProp>
72-
<boolProp name="ignoreFirstLine">true</boolProp>
73-
<boolProp name="quotedData">false</boolProp>
74-
<boolProp name="recycle">true</boolProp>
75-
<stringProp name="shareMode">shareMode.all</stringProp>
76-
<boolProp name="stopThread">false</boolProp>
77-
<stringProp name="variableNames">username,query</stringProp>
78-
</CSVDataSet>
79-
```
71+
:::code language="xml" source="~/azure-load-testing-samples/jmeter-read-csv/read-from-csv.jmx" range="30-41" highlight="10":::
8072

8173
1. Save the JMeter script and add it to your [test plan](./how-to-create-manage-test.md#test-plan).
8274

0 commit comments

Comments
 (0)