3

How to validate response assertion with XML elements see below http response example?

Is this correct? enter image description here

Response Data in jemeter

3

I think XPath Assertion would be a better match for XML data, the relevant XPath expression to check whether sampledUrl node text is equal to http://abc.com/off/paul.html will be:

//sampledUrl/text()='http://abc.com/off/paul.html'

JMeter XPath Assertion Example

See How to Use JMeter Assertions in Three Easy Steps article for more information on conditionally failing JMeter samplers with different types of assertions.

  • is it possible to add two Xpath assertions and two response assertions? – lak May 4 '17 at 10:10
  • as many as you need, but remember that assertions has their cost so try to limit their usage to only those which are absolutely required – Dmitri T May 4 '17 at 11:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.