XML Schema Assertion

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?

  1. Choose the ‘Sampler’ node whose response needs to be verified.
  2. Place a right-click on the sampler component.
  3. Place your cursor over ‘Add’.
  4. Place your pointer over ‘Assertions’.
  5. Choose ‘XML Schema Assertion’.
JMeter 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.

Scroll to Top