JMeter – XML Schema Assertion
According to the previous post, XML Assertion is a generic assertion element that is mainly used to check the XML format of the response. XML schema assertion is used in the JMeter script when we need to validate a certain XML response. With these types of claims, the actual response should be checked against the XML schema file we can provide (along with the path). The sample is passed when the response matches the schema; otherwise, it will fail with an error.
XML Schema Assertion: How can I add it?
- Choose the ‘Sampler’ node whose response needs to be verified.
- Place a right-click on the sampler component.
- Place your cursor over ‘Add’.
- Place your pointer over ‘Assertions’.
- Choose ‘XML Schema Assertion’.
What are the ‘XML Schema Assertion’ element’s input fields?
The input fields for “XML Schema Assertion” are as follows:
Name: To give the assertion’s name.
Please leave arbitrary remarks, if any.
XML Schema: To identify the schema’s file name and directory.