XML Assertion

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.JMeter - XML Assertion

Failure Case:

JMeter - XML Assertion

How is ‘XML Assertion’ added?

You can take the actions listed below:

  1. Decide which ‘Sampler’ node’s answer should be in XML format.
  2. Place a right-click on the sampler component.
  3. Place your cursor over ‘Add’.
  4. Place your pointer over ‘Assertions’.
  5. Choose ‘XML Assertion’.

How to remove ‘XML Assertion’?

You can follow the below steps:

  1. Select the ‘XML Assertion’ element
  2. Right-click on the ‘XML Assertion’ element
  3. Click ‘Remove’ (Mouse) or ‘Delete’ button from the keyboard
  4. 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)

Scroll to Top