HTTP POST with XML Message
How to use HTTP protocol to post an XML message to a server?
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:
2018-03-18, 422👍, 0💬
How to generate MAC addresses? To help you to obtain some MAC addresses for testing purpose, FYIcent...
How to convert binary data to hexadecimal format (or Binary to Hex Encoding)? Binary to Hex encoding...
Where to find tutorials on Apache JMeter test tool? I want to know how to use Apache JMeter. Here is...
How to valid IP addresses? In order to help your programming or testing tasks, FYIcenter.com has des...
How to perform HTML entity encoding? HTML entity encoding is designed to protect HTML reserved chara...