Collections:
HTTP POST with JSON Message
How to use HTTP protocol to post a JSON message to a server?
✍: FYIcenter.com
You can follow this tutorial to post a JSON message to a server with JMeter.
1. Create a Test Plan called Azure-Echo-API-JSON.jmx with the following HTTP Request in a Thread Group:
Protocol: http
Server Name: echoapi.cloudapp.net
Method: POST
Path: /api
Body Data:
{
"TestRun": {
"ID": 1,
"Name": "First Run",
"Success": true,
"Reference": null
}
}
2. Add a "View Results Tree" listener to the test plan. And run it.
3. Open the "View Results Tree" listener, select the HTTP Request, and click on "Response Data". You see the same JSON message returned back from the saver.
⇒ Set Content-Type to application/json
⇐ Working With JSON Body Messages
2018-10-08, ∼4530🔥, 0💬
Popular Posts:
How to use HTTP protocol to post an XML message to a server? You can follow this tutorial to post an...
How to access Response Status Code 400 as Success? My sampler failed, because the server returns the...
How to find out my browser's identification information? To help you to see your browser identificat...
How to generate IP Addresses? To help you to obtain some IP addresses for testing purpose, FYIcenter...
Where to find tutorials on UFT (Unified Functional Testing) tool? I want to know how to use UFT. Her...