Custom Script Help #3196
IamCoderish
started this conversation in
Artillery
Replies: 1 comment 3 replies
-
@IamCoderish it looks like your custom function is |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I am trying to dynamically pass changing variables in my json API payload every time a VU is created. I was looking at the
BeforeRequest
option and it seems like this will work. However I am running into issue with my js function. I am transpiling my TS code back to JS and running the JS script in the YAML file. I'm using the faker module https://fakerjs.dev/ to generate fake data to pass into the request payload.Following the guide https://www.artillery.io/docs/reference/test-script#processor---load-custom-code I am was calling
next()
at the end of my function, but I keep getting error⠴ worker error, id: 1 TypeError [Error]: next is not a function
which is obvious since next is just param. I saw in a different discussion https://github.com/artilleryio/artillery/discussions/2638 that they were able to get this to work w/o error. I know I am really close to getting this to work, any help would be appreciated.yamlParser.ts
yaml
Beta Was this translation helpful? Give feedback.
All reactions