Skip to content

Commit fcdac9e

Browse files
[skip ci] Add clarification in user guide about CSV format
1 parent f2e8982 commit fcdac9e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/guide/request-generation/csv-dataset.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,16 @@ public class PerformanceTest {
4242
}
4343
```
4444

45+
::: tip
46+
To properly format the data in your CSV, a general rule you can apply is to replace each double quotes with two double quotes and add double quotes to the beginning and end of each CSV value.
47+
48+
E.g.: if you want one CSV field to contain the value `{"field": "value"}`, then use `"{""field:"": ""value""}"`.
49+
50+
This way, with a simple search and replace, you can include in a CSV field any format like JSON, XML, etc.
51+
52+
Note: JMeter uses should be aware that JMeter DSL `csvDataSet` sets `Allowed quoted data?` flag, in associated `Csv Data Set Config` element, to `true`.
53+
:::
54+
4555
By default, the CSV file will be opened once and shared by all threads. This means that when one thread reads a CSV line in one iteration, then the following thread reading a line will continue with the following line.
4656

4757
If you want to change this (to share the file per thread group or use one file per thread), then you can use the provided `sharedIn` method like in the following example:

0 commit comments

Comments
 (0)