Collections:
HTTP POST with XML Message
How to use HTTP protocol to post an XML message to a server?
✍: FYIcenter.com
You can follow this tutorial to post an XML message to a server with JMeter.
1. Create a Test Plan called Azure-Echo-API.jmx with the following HTTP Request in a Thread Group:
Protocol: http Server Name: echoapi.cloudapp.net Method: POST Path: /api Body Data: <?xml version="1.0"?> <TestRun xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://sqa.fyicenter.com"> <field name="ID">1</field> <field name="Name">First Run</field> <field name="Success">1</field> <field name="Reference" xsi:nil="true" /> </TestRun>
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 XML message returned back from the saver.
The picture below shows you the posted XML message returned from a remote server:
⇒ XML Assertion - XML Validation
⇐ Working With XML Body Messages
2018-03-18, ≈17🔥, 0💬
Popular Posts:
How to convert a date and time to a standard format? Date and time can be displayed in a number of s...
How to convert hexadecimal encoded data back to binary data (or Hex to Binary Decoding)? Hex to Bina...
How to Pass Windows Environment Variable to JMeter? I want to use Windows temporary folder environme...
How to turn on Chrome WebDriver logging with Selenium Python API? If you want to turn on logging on ...
How to set Content-Type to application/json? The server requires the Content-Type to be application/...