JMeter – XML Assertion
The main purpose of JMeter’s XML assertion is to verify the XML format of the response. No input is required for this type of return. The sample is passed if the response is successfully prepared in XML; otherwise, it will fail with an error.
Failure Case:
How is ‘XML Assertion’ added?
You can take the actions listed below:
- Decide which ‘Sampler’ node’s answer should be in XML format.
- Place a right-click on the sampler component.
- Place your cursor over ‘Add’.
- Place your pointer over ‘Assertions’.
- Choose ‘XML Assertion’.
How to remove ‘XML Assertion’?
You can follow the below steps:
- Select the ‘XML Assertion’ element
- Right-click on the ‘XML Assertion’ element
- Click ‘Remove’ (Mouse) or ‘Delete’ button from the keyboard
- Click ‘Yes’
Input fields
‘XML Assertion’ has the generic input fields which are:
Name: To provide the name of the assertion.
Comments: To provide arbitrary comments (if any)