I am new to jmeter. I have been experimenting on creating a jmeter script manually by inspecting the network log from chrome developer tools rather than directly recording the HTTPS script recorder due to certain restrictions.
I have encountered a json Post request that has some query string parameters along with a request payload parameter. I have added the appropriate headers including the Content-Type: application/json header. But I am confused on how to pass both the query string parameter and the request payload in a single request. I am not sure if I should mix the request payload parameter along with the query string parameter and send it in jmeter body data tab.
Pointers appreciated!
There is nothing wrong in having both parameters and body data, just make sure to append the parameters to the "Path" section and provide your JSON payload using "Body Data" tab:
As you can see JMeter normally sends the request
Also be aware that you don't have to manually populate HTTP Request samplers, using JMeter's HTTP(S) Test Script Recorder will make your life easier as JMeter provides record-and-replay functionality (of course most likely you will need to perform correlation, however the effort will be less). Alternatively you can consider using JMeter Chrome Extension which is even more fast and easy as you won't have to worry about proxies, certificates, etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With