artillery

Error passing variable to artillery script


I am using very simple command to test artillery script and trying to pass variable from the command line. Command is

artillery run -v '{"var1": "value1", "var2": "value2"}' .\test\performance\applications.yml -e development

It is giving error

Variable definition is not valid JSON. Correct example: -v '{"var1": "value1", "var2": "value2"}'

I cannot see any difference in my command and the fricking error. Any help is appreciated.


Solution

  • Answer is found in one of the artillery forums. Inside quotes needs to be escaped. Their documentation is abysmal.

    https://github.com/artilleryio/artillery/issues/984