jmeterjmeter-pluginsjmeter-5.0jmeter-maven-plugin

Jmeter - Incorrect Response due to query parameters encoding


In Jmeter I created a simple GET request having query params as below

https://xxxx.com/salsvc/api/Compensation?employeeId=TestEmp1

But in listener response I get No Item found

Whereas if I run the same request through POSTMAN , it gives me the correct expected result

"data": [ { "frequency": "Single", "ItemName": "Basic Salary", "employeeId": "TestEmp1", "ItemId": 1 } ]

Even if I create request by importing CURL from POSTMAN , I get incorrect result.

I tried using JMETER function like encoding/decoding but no success .

I think something is incorrect with the way my query params are being treated in Jmeter . Any help will be much appreciated

enter image description here


Solution

  • Try specifying your parameters in URL query string directly:

    enter image description here

    In general if your request works in cURL or Postman you can:

    See How to Convert Your Postman API Tests to JMeter for Scaling article for more details if needed.