Artillery: Running multiple targets in parallel

Created on 1 Feb 2019  路  3Comments  路  Source: artilleryio/artillery

Can i have multiple targets run in parallel - we have the requirement of running 50 different urls calling some api's in parallel. How can i achieve this ?

Thanks.

All 3 comments

Any clue? I'd like to do the same

Try this 馃憤

{
"config": {
"target": "https://domain-1.obfuscated.com",
"phases": [
{
"duration": 10,
"arrivalRate": 5
}
],
"http": {
"maxSockets": 10
}
},
"scenarios": [
{
"flow": [
{ "log": "Start" },
{
"get": {
"url": "/some-endpoint"
}
},
{
"parallel": [
{
"post": {
"url": "https://domain-2.obfuscated.com/endpoint",
"json": {
"some": "json",
"payload": [
"with-arrays"
]
},
"headers": {
"and": "also",
"some": "headers"
}
}
},
{
"post": {
"url": "https://domain-2.obfuscated.com/endpoint",
"json": {
"some": "json",
"payload": [
"with-arrays"
]
},
"headers": {
"and": "also",
"some": "headers"
}
}
},
{
"post": {
"url": "https://domain-2.obfuscated.com/endpoint",
"json": {
"some": "json",
"payload": [
"with-arrays"
]
},
"headers": {
"and": "also",
"some": "headers"
}
}
}
]
},
{ "log": "Done" }
]
}
]
}

'parallel' is interesting. But I didn't find it anywhere else even in official documents and guides.

@devdelpiero, honestly I cannot fully understand your code. Could you please tell us more about it?

Appreciated.

Was this page helpful?
0 / 5 - 0 ratings