I'm trying to set Artillery config to be able to send nested JSON body. This is how my configuration looks like:
config:
  target: <URL>
  phases:
    - duration: 10
      arrivalRate: 20
  processor: "./input-parser.js"
scenarios:
  - flow:
    - function: "parseJsonFile"
    - post:
        url: /workflow-instance
        headers:
           Content-Type: "application/json"
        json:
          name: "{{ name }}"
          namespace: "{{ namespace }}"
          template_name: "{{ template_name }}"
          attributes: "{{ attributes }}"
    - get:
        url: "/workflow-instance/status?name={{ template_name }}&namespace={{ namespace }}"
I have a problem with "attributes" because the content of attributes is:
{ pod_name: 'POD_NAME', port: 'PORT_NUMBER' }
So basically, this will not work:
attributes: "{ pod_name: 'POD_NAME', port: 'PORT_NUMBER' }"
as well as this:
attributes:
  pod_name: 'POD_NAME'
  port: 'PORT_NUMBER'
I didn't found good examples for this particular case in Artillery docs.
 
     
     
    