artillery called from a nodejs app #1240
luisfilsilva
started this conversation in
Artillery
Replies: 1 comment 1 reply
-
hi @luisfilsilva 👋 yes, the way you're doing it is the general recommended route, i.e. wrap the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi experts,
Not sure if this is a strange question for you, but.. is it possible to launch artillery inside a nodejs application, instead of using a command line? I wanted to expose artillery in my app that listens for websocket commands (start load test, share stats, etc)..
Right now, I'm able to make it work by using the module spawn, but was wondering if there is another approach.
const artillery = spawn("./node_modules/.bin/artillery", [
"run",
"--target",
message.target,
"--overrides",
"{"config": { "phases": [{ "duration": "+message.duration+", "arrivalRate": "+message.rate+", "name": "Load Test" }] } }",
"-k",
"config.yml",
]);
Thanks!!
Luís
Beta Was this translation helpful? Give feedback.
All reactions