Package org.apache.jmeter.assertions
Class XPath2Assertion
java.lang.Object
org.apache.jmeter.testelement.AbstractTestElement
org.apache.jmeter.testelement.AbstractScopedTestElement
org.apache.jmeter.testelement.AbstractScopedAssertion
org.apache.jmeter.assertions.XPath2Assertion
- All Implemented Interfaces:
- Serializable,- Cloneable,- Assertion,- Searchable,- org.apache.jmeter.testelement.TestElement
Checks if the result is a well-formed XML content and whether it matches an
 XPath
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.apache.jmeter.testelement.TestElementorg.apache.jmeter.testelement.TestElement.Companion
- 
Field SummaryFieldsFields inherited from interface org.apache.jmeter.testelement.TestElementCOMMENTS, Companion, ENABLED, GUI_CLASS, NAME, TEST_CLASS
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiongetResult(SampleResult response) Returns the result of the Assertion.Get The XPath String that will be used in matching the documentbooleanNegate the XPath test, that is return true if something is not found.voidsetNamespaces(String namespaces) voidsetNegated(boolean negate) voidsetXPathString(String xpath) Set the XPath String this will be used as an xpathMethods inherited from class org.apache.jmeter.testelement.AbstractScopedAssertiongetScopeNameMethods inherited from class org.apache.jmeter.testelement.AbstractScopedTestElementfetchScope, getProps, getSampleList, getSchema, getVariableName, isScopeAll, isScopeChildren, isScopeParent, isScopeVariable, isScopeVariable, setScopeAll, setScopeChildren, setScopeParent, setScopeVariableMethods inherited from class org.apache.jmeter.testelement.AbstractTestElementaddPropertiesValues, addProperty, addProperty, addTestElement, canRemove, clear, clearTemporary, clearTestElementChildren, clone, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getPropertyOrNull, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traversePropertyMethods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.jmeter.testelement.TestElementget, get, get, get, get, get, get, get, get, getOrCreate, getOrCreate, getOrNull, getOrNull, getOrNull, getPropertyOrNull, getString, removed, removeProperty, set, set, set, set, set, set, set, set, set
- 
Field Details- 
DEFAULT_XPATH- See Also:
 
 
- 
- 
Constructor Details- 
XPath2Assertionpublic XPath2Assertion()
 
- 
- 
Method Details- 
getResultReturns the result of the Assertion. Checks if the result is well-formed XML, and that the XPath expression is matched (or not, as the case may be)
- 
getXPathStringGet The XPath String that will be used in matching the document- Returns:
- String xpath String
 
- 
setXPathStringSet the XPath String this will be used as an xpath- Parameters:
- xpath- String
 
- 
setNegatedpublic void setNegated(boolean negate) 
- 
isNegatedpublic boolean isNegated()Negate the XPath test, that is return true if something is not found.- Returns:
- boolean negated
 
- 
setNamespaces
- 
getNamespaces
 
-