Multiple response assertions and Xpath assertions not working see below.could you please explain it with example?
1 Answer
I believe it would be a lot easier to use 4 separate assertions like:
Combining several clauses into single assertion is also possible, for example:
- there are
|
andand
XPath operators - there is
|
regex meta character
See How to Use JMeter Assertions in Three Easy Steps to learn more about using assertions in JMeter tests.
-
When combining several clauses into single Response assertion->pattern to test for example: http:abc1.com.html|http:abc1.com.html| Do you think this is working becoause it was not working for me?– lakCommented May 5, 2017 at 7:17
-
Given you choose
Contains
pattern matching rule it should work. Also the last|
is not required– Dmitri TCommented May 5, 2017 at 8:18 -
http:abc1.com.html|http:abc1.com.html --> Response Assertion failure message: TransformerException: Unknown error in XPath. Xpath assertion looks like //product/url = 'http:abc1.com.html' l //product/image 'http:abc2.com.html'– lakCommented May 5, 2017 at 8:27
-
I was talking about response assertion, not the xpath assertion– Dmitri TCommented May 5, 2017 at 8:29
-
Yes in response assertion 'Contains' pattern matching rule is used. isn't possible to combining several Xpath assertions?– lakCommented May 5, 2017 at 8:34