I need to test an API that accepts bulk JSON requests using records from a CSV file. I'm well versed in sending simple REST requests using data from CSV files (and therefore JMeter variables and all that).
Is it possible for JMeter to batch a CSV file of 10,000 records into JSON payloads of 100 records each?
I've found answers that cover making JSON payloads from CSV files line-by-line, and even how to use pre-made JSON files as payloads, but nothing about dynamically creating JSON payloads from multiple lines in a CSV file before sending the requests.
For example:
The CSV would be something like
col1,col2
a,b
c,d
e,f
...
And I need a JSON payload like
{
'Some keys that dont change': null,
[
{'RecordNum': 1, 'col1': 'a', 'col2': 'b'},
{'RecordNum': 2, 'col1': 'c', 'col2': 'd'},
{'RecordNum': 3, 'col1': 'e', 'col2': 'f'},
...
]
}
TIA!
Aucun commentaire:
Enregistrer un commentaire