Class XPath2Assertion

  • All Implemented Interfaces:
    java.io.Serializable , java.lang.Cloneable , org.apache.jmeter.assertions.Assertion , org.apache.jmeter.gui.Searchable , org.apache.jmeter.testelement.TestElement

    
    public class XPath2Assertion
    extends AbstractScopedAssertion implements Serializable, Assertion
                        

    Checks if the result is a well-formed XML content and whether it matches an XPath

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      AssertionResult getResult(SampleResult response) Returns the result of the Assertion.
      String getXPathString() Get The XPath String that will be used in matching the document
      void setXPathString(String xpath) Set the XPath String this will be used as an xpath
      void setNegated(boolean negate)
      boolean isNegated() Negate the XPath test, that is return true if something is not found.
      void setNamespaces(String namespaces)
      String getNamespaces()
      • Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement

        addTestElement, canRemove, clear, clearTestElementChildren, clone, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getPropertyOrNull, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse
      • Methods inherited from class org.apache.jmeter.testelement.AbstractScopedTestElement

        fetchScope, getProps, getSchema, getVariableName, isScopeAll, isScopeChildren, isScopeParent, isScopeVariable, setScopeAll, setScopeChildren, setScopeParent, setScopeVariable
      • Methods inherited from class org.apache.jmeter.testelement.TestElement

        get, get, get, get, get, get, get, get, get, getOrCreate, getOrCreate, getOrNull, getOrNull, getOrNull, getProps, getSchema, getString, removed, set
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XPath2Assertion

        XPath2Assertion()
    • Method Detail

      • getResult

         AssertionResult getResult(SampleResult response)

        Returns 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)

      • getXPathString

         String getXPathString()

        Get The XPath String that will be used in matching the document

        Returns:

        String xpath String

      • setXPathString

         void setXPathString(String xpath)

        Set the XPath String this will be used as an xpath

        Parameters:
        xpath - String
      • isNegated

         boolean isNegated()

        Negate the XPath test, that is return true if something is not found.

        Returns:

        boolean negated