JMeter - Save the dynamic values into a variable

48 views
Skip to first unread message

Ajith R

unread,
Jun 10, 2024, 1:22:00 AMJun 10
to JMeter Forum
Hi Team,

I have a GraphQL request. There are dynamic values, generated with the help of functions here (marked in green). Kindly find below a snippet:

"text": "Device Type Identifier"
          },
          "system": "urn:oid:1.3.6.1.4.1.50624.1.2.4",
          "value": "1.3.6.1.4.1.50624.1.3.1.1"
        }
      ],
      "manufacturer": null,
      "serialNumber": "PerfTest_${__threadNum}_${__time(yyyy-MM-dd|HH:mm:ss.SSS,)}"
    }
  }

I need to save this value to a variable. Write the variable into a file.

Could you please help me with this?

Regards,
Ajith

DT

unread,
Jun 10, 2024, 2:21:52 AMJun 10
to JMeter Forum
You can declare the variable in the User Parameters pre-processor:

Untitled.jpg

Then you can declare this "serialNumber" as the Sample Variable  - this way the value will be saved as an extra column in the .jtl results file
Reply all
Reply to author
Forward
0 new messages