ResponseAssertion (Apache JMeter dist API)
Description: declaration: package: org.apache.jmeter.assertions, class: ResponseAssertion

Package org.apache.jmeter.assertions

# Class ResponseAssertion

java.lang.Object
org.apache.jmeter.testelement.AbstractTestElement
org.apache.jmeter.testelement.AbstractScopedTestElement
org.apache.jmeter.testelement.AbstractScopedAssertion
org.apache.jmeter.assertions.ResponseAssertion

All Implemented Interfaces:
  `Serializable`, `Cloneable`, `Assertion`, `Searchable`, `org.apache.jmeter.testelement.TestElement`

public class ResponseAssertion extends AbstractScopedAssertion implements Serializable, Assertion
Test element to handle Response Assertions. See `AssertionGui` for GUI.

See Also:
  - Serialized Form

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from interface org.apache.jmeter.testelement.TestElement

  `org.apache.jmeter.testelement.TestElement.Companion`

- ## Field Summary

  ### Fields inherited from interface org.apache.jmeter.testelement.TestElement

  `COMMENTS, Companion, ENABLED, GUI_CLASS, NAME, TEST_CLASS`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ResponseAssertion()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addTestString(String testString)`
  `void`
  `clear()`
  `void`
  `clearTestStrings()`
  `boolean`
  `getAssumeSuccess()`
  `String`
  `getCustomFailureMessage()`
  `AssertionResult`
  `getResult(SampleResult response)`
  Returns the AssertionResult object encapsulating information about the success or failure of the assertion.
  `String`
  `getTestField()`
  `CollectionProperty`
  `getTestStrings()`
  `int`
  `getTestType()`
  `boolean`
  `isContainsType()`
  `boolean`
  `isEqualsType()`
  `boolean`
  `isMatchType()`
  `boolean`
  `isNotType()`
  `boolean`
  `isOrType()`
  `boolean`
  `isSubstringType()`
  `boolean`
  `isTestFieldRequestData()`
  `boolean`
  `isTestFieldRequestHeaders()`
  `boolean`
  `isTestFieldResponseCode()`
  `boolean`
  `isTestFieldResponseData()`
  `boolean`
  `isTestFieldResponseDataAsDocument()`
  `boolean`
  `isTestFieldResponseHeaders()`
  `boolean`
  `isTestFieldResponseMessage()`
  `boolean`
  `isTestFieldURL()`
  `void`
  `setAssumeSuccess(boolean b)`
  `void`
  `setCustomFailureMessage(String customFailureMessage)`
  `void`
  `setTestFieldRequestData()`
  `void`
  `setTestFieldRequestHeaders()`
  `void`
  `setTestFieldResponseCode()`
  `void`
  `setTestFieldResponseData()`
  `void`
  `setTestFieldResponseDataAsDocument()`
  `void`
  `setTestFieldResponseHeaders()`
  `void`
  `setTestFieldResponseMessage()`
  `void`
  `setTestFieldURL()`
  `void`
  `setToContainsType()`
  `void`
  `setToEqualsType()`
  `void`
  `setToMatchType()`
  `void`
  `setToNotType()`
  `void`
  `setToOrType()`
  `void`
  `setToSubstringType()`
  `void`
  `unsetNotType()`
  `void`
  `unsetOrType()`

  ### Methods inherited from class org.apache.jmeter.testelement.AbstractScopedAssertion

  `getScopeName`

  ### Methods inherited from class org.apache.jmeter.testelement.AbstractScopedTestElement

  `fetchScope, getProps, getSampleList, getSchema, getVariableName, isScopeAll, isScopeChildren, isScopeParent, isScopeVariable, isScopeVariable, setScopeAll, setScopeChildren, setScopeParent, setScopeVariable`

  ### Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement

  `addPropertiesValues, addProperty, addProperty, addTestElement, canRemove, 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, traverseProperty`

  ### Methods inherited from class java.lang.Object

  `finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface org.apache.jmeter.testelement.TestElement

  `get, 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`

- ## Constructor Details

  - ### ResponseAssertion

    public ResponseAssertion()

- ## Method Details

  - ### clear

    public void clear()
    Description copied from class: `AbstractTestElement`
    Specified by:
      `clear` in interface `org.apache.jmeter.testelement.TestElement`
    Overrides:
      `clear` in class `AbstractTestElement`

  - ### setTestFieldURL

    public void setTestFieldURL()

  - ### setTestFieldResponseCode

    public void setTestFieldResponseCode()

  - ### setTestFieldResponseData

    public void setTestFieldResponseData()

  - ### setTestFieldResponseDataAsDocument

    public void setTestFieldResponseDataAsDocument()

  - ### setTestFieldResponseMessage

    public void setTestFieldResponseMessage()

  - ### setTestFieldResponseHeaders

    public void setTestFieldResponseHeaders()

  - ### setTestFieldRequestHeaders

    public void setTestFieldRequestHeaders()

  - ### setTestFieldRequestData

    public void setTestFieldRequestData()

  - ### setCustomFailureMessage

    public void setCustomFailureMessage(String customFailureMessage)

  - ### getCustomFailureMessage

    public String getCustomFailureMessage()

  - ### isTestFieldURL

    public boolean isTestFieldURL()

  - ### isTestFieldResponseCode

    public boolean isTestFieldResponseCode()

  - ### isTestFieldResponseData

    public boolean isTestFieldResponseData()

  - ### isTestFieldResponseDataAsDocument

    public boolean isTestFieldResponseDataAsDocument()

  - ### isTestFieldResponseMessage

    public boolean isTestFieldResponseMessage()

  - ### isTestFieldResponseHeaders

    public boolean isTestFieldResponseHeaders()

  - ### isTestFieldRequestHeaders

    public boolean isTestFieldRequestHeaders()

  - ### isTestFieldRequestData

    public boolean isTestFieldRequestData()

  - ### addTestString

    public void addTestString(String testString)

  - ### clearTestStrings

    public void clearTestStrings()

  - ### getResult

    public AssertionResult getResult(SampleResult response)
    Description copied from interface: `Assertion`
    Returns the AssertionResult object encapsulating information about the success or failure of the assertion.
    Specified by:
      `getResult` in interface `Assertion`
    Parameters:
      `response` - the SampleResult containing information about the Sample (duration, success, etc)
    Returns:
      the AssertionResult containing the information about whether the assertion passed or failed.

  - ### getTestField

    public String getTestField()

  - ### getTestType

    public int getTestType()

  - ### getTestStrings

    public CollectionProperty getTestStrings()

  - ### isEqualsType

    public boolean isEqualsType()

  - ### isSubstringType

    public boolean isSubstringType()

  - ### isContainsType

    public boolean isContainsType()

  - ### isMatchType

    public boolean isMatchType()

  - ### isNotType

    public boolean isNotType()

  - ### isOrType

    public boolean isOrType()

  - ### setToContainsType

    public void setToContainsType()

  - ### setToMatchType

    public void setToMatchType()

  - ### setToEqualsType

    public void setToEqualsType()

  - ### setToSubstringType

    public void setToSubstringType()

  - ### setToNotType

    public void setToNotType()

  - ### unsetNotType

    public void unsetNotType()

  - ### setToOrType

    public void setToOrType()

  - ### unsetOrType

    public void unsetOrType()

  - ### getAssumeSuccess

    public boolean getAssumeSuccess()

  - ### setAssumeSuccess

    public void setAssumeSuccess(boolean b)