Definition: XPath is the XML path language, which is a language used to determine the location of a certain part of an XML document. XPath is based on the XML tree structure and provides the ability to find nodes in the data structure tree.
Target: Assert the data type whose return information is XPath.
How to add: Right-click request-Add-Assertion-
XPath Assertion After selecting the mode, add XPath Assertion to
add the assertion result:
clear the previous result, click Start, and run the test.
We can see that there is no error, and then we can see that the assertion result
is normal. It means that our XPath Assertion assertion succeeded.
Let’s take a look at the error situation. First, let’s deliberately write a wrong XPath Assertion, remove one]
Then, clear the previous result, click Start, run the test, and see the result. The
error means that this is missing]
We can Seeing XPath Assertion and corresponding response assertion is actually that this one uses text directly and the other is to fill in XPath. In fact, we use the most response assertion.
9, Jmeter's XPath assertion
Guess you like
Origin blog.csdn.net/weixin_45608577/article/details/108611464
Ranking