Search code examples
jsonvariablesjmeterhttprequest

How to pass both parameter and JSON in one single HTTP request body with having JSON a variable [JMeter]


I have a similar but extended question for the below question. How to pass parameter and json both in http request request body in jmeter??

I will take the same example as mentioned in the above question/link. Have to pass multiple parameters,

UserId=47
meeting={
    "DeviceID":${deviceID},
    "NetworkCarrierName":"VODAFONEIN",
    "BatteryValue":"22",
    "AppVersion":"1.1.3",
 }

As you can see, DeviceID have a value from variable deviceID. I want to pass all these parameters and JSON in one single http request body. What would be the approach for this?


Solution

  • In parameter I have to add the variable for value part for whichever key I want to refer to. It will work fine. This image shows that..