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
⇑ Working With JSON Body Messages
⇑⇑ Apache JMeter Tutorials
2018-10-08, 2866👍, 0💬
Popular Posts:
How to validate email address format? In order to help your programming or testing tasks, FYIcenter....
How to call JMeter command in a Windows batch file? I want to create a single batch job to run JMete...
How to perform regular expression pattern match with multiple occurrences? To perform a regular expr...
How to generate test fractional numbers? Test fractional numbers are numbers with fractions that are...
Where to find test data generators? FYIcenter.com has prepared a number of test data generators for ...