Is there a way to conditionally use qs params? #3500
nullsocket
started this conversation in
Artillery
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
My usecase is pagination, first request never has qs param but provides a token
Currently I've tried to use a variable from context.vars in the url and setting that variable in processors, but it seems like artillery.io doesn't like that.
I've had partial luck with ifTrue using the variable I set for pagination and having one request built out like(for brevity pseudo code I'm on mobile at moment) :
get:
ifTrue: not pageToken
url: "/users"
get:
ifTrue: pageToken
url: "/users"
qs:
next: "{{ pageToken }}"
And another request without qs for the initial one, however it seems like it gets only 2 tokens in before one of the vUsers just doesn't seem to see the pageToken and calls the first request again resetting the page token.
Should I be tracking every single vUsers pageTokens independently?
Beta Was this translation helpful? Give feedback.
All reactions