Repeating data (JSON)
This functionality is only available for JSON responses
http-response makes it possible to repeat list items in JSON responses.
This is done by including the special property __repeat
on the list items you'd like to repeat.
Let me show you by using an example payload:
{
"body": {
"users": [
{
"name": "{{ name() }}",
"age": "{{ numberBetween(18, 85) }}",
"uuid": "{{ uuid() }}",
"uploads": [
{
"filename": "{{ word() }}.{{ fileExtension() }}",
"mime_type": "{{ mimeType() }}",
"__repeat": 5
}
],
"__repeat": 5
}
]
}
}
This payload will generate a list of 5 users with 5 uploads each.
Each with its own fake data generated.