Artillery: multiple targets

Created on 3 May 2017  路  10Comments  路  Source: artilleryio/artillery

I have a scenario where I'm load testing 3 connected web applications (with one that provides a logged in session cookie) Is there any way to have one test file that can have multiple targets? I tried setting the URL on each request and not providing a target at all and that didn't work.

What I was thinking of doing:

config:
phases:
- duration: 1
arrivalRate: 1
defaults:
headers:
x-my-service-auth: '987401838271002188298567'

scenarios:

Most helpful comment

There is a dirty workaround for this:
target: "http:/"
....
scenarios:

  • flow:

    • get:

      url: "/server1:1234/test"

    • get:

      url: "/server2:4567/test2"

It's not ideal but it should work

All 10 comments

Also need this functionality

You should be able to set target to one of the targets and then use full URLs in actual request specs.

What about WebSocket? How can I have multiple targets (eg: connect to one auth server, after auth responds with login info connect to the actual content server while using the ws engine?

There is a dirty workaround for this:
target: "http:/"
....
scenarios:

  • flow:

    • get:

      url: "/server1:1234/test"

    • get:

      url: "/server2:4567/test2"

It's not ideal but it should work

Do we still need this workaround in 2019?

Faced with the same issue, workaround works, but it would be really good to see official solution for that

I also need this for an app with multiple websocket servers.

Can you use HTTP and WS in the same file ?

I have the same problem where my web application needs to connect to both http requests and a websocket. Is there a way to configure both https and wss requests in the same file?

I also would like to execute one test for WS and HTTP in the same configuration file and the environment config too.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dshook picture dshook  路  5Comments

SamDecrock picture SamDecrock  路  5Comments

mrchief picture mrchief  路  3Comments

damon-kreft picture damon-kreft  路  3Comments

kennethlynne picture kennethlynne  路  5Comments