In JMeter, XML Assertion is mainly used to validate the format of XML embedded in the response. This type of assertion does not need any input. When the response is well XML formatted then the sampler is passed else failed with an error.
Failure Case:
How to add ‘XML Assertion’?
You can follow the below steps:
- Select the ‘Sampler’ node whose response should be in XML format
- Right-click on the sampler element
- Hover the cursor on ‘Add’
- Hover the cursor on ‘Assertions‘
- Click ‘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)
You may be interested:
- Performance Testing Tutorial
- Performance Engineering Tutorial
- Micro Focus LoadRunner Tutorial
- NeoLoad Tutorial