Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use payload with websocket target #663

Closed
Rykian opened this issue Mar 8, 2019 · 8 comments · Fixed by #1119
Closed

Use payload with websocket target #663

Rykian opened this issue Mar 8, 2019 · 8 comments · Fixed by #1119

Comments

@Rykian
Copy link

Rykian commented Mar 8, 2019

Hi there!

Is it possible to use payload to customize target URL in Websocket ?

I'm trying to use this config:

config:
  payload:
    path: "users.csv"
    fields:
      - "access_token"
      - "login"
    skipHeader: true
  target: 'wss://localhost/websocket?auth={{ access_token }}'
  tls:
    rejectUnauthorized: false
  phases:
    - duration: 200
      arrivalRate: 1
scenarios:
  - engine: 'ws'
    flow:
      - think: 100

with the following CSV:

"access_token","login"
"A test token","Rykian"

But my auth param on server side is always undefined

@hassy
Copy link
Member

hassy commented Mar 8, 2019

Not possible at the moment, as target is set once for all virtual users. What we need to do is to add a connect action in the WebSocket engine, which can be used for custom connection parameters. Thanks for opening the issue @Rykian!

@thiagosan
Copy link

I have this "issue" too. Is there any chance to develop this feature?

@GNSubrahmanyam
Copy link

@hassy How to achive this ?

@GNSubrahmanyam
Copy link

@hassy I need a solution as soon as possible. @Rykian and @thiagosan How you achive this ?

@Rykian
Copy link
Author

Rykian commented Sep 20, 2020

I didn't used artillery: I wrote a custom script from scratch.

@GNSubrahmanyam
Copy link

@Rykian Can you share that script with me

@Rykian
Copy link
Author

Rykian commented Sep 20, 2020

I can't, my client paid me for it, he is the owner of the code. But your GitHub profile seems to show that your are an accomplished developer, read the doc of websocket client and get a lib to read a CSV in whatever language you like and code it yourself :)

@smilyanp
Copy link

This is still an issue for me, please update once it is resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants