org.apache.jmeter.assertions

## Class CompareAssertion

- java.lang.Object
- - org.apache.jmeter.testelement.AbstractTestElement
  - - org.apache.jmeter.assertions.CompareAssertion

- All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, Assertion, LoopIterationListener, Searchable, TestBean, TestElement

      public class CompareAssertion
      extends AbstractTestElement
      implements Assertion, TestBean, java.io.Serializable, LoopIterationListener

  See Also:
    Serialized Form

- - ### Field Summary

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

      `COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CompareAssertion()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getCompareTime()`
    `AssertionResult` | `getResult(SampleResult response)` Returns the AssertionResult object encapsulating information about the success or failure of the assertion.
    `java.util.Collection<SubstitutionElement>` | `getStringsToSkip()`
    `boolean` | `isCompareContent()`
    `void` | `iterationStart(LoopIterationEvent iterEvent)` Called when a loop iteration is about to start.
    `void` | `setCompareContent(boolean compareContent)`
    `void` | `setCompareTime(long compareTime)`
    `void` | `setStringsToSkip(java.util.Collection<SubstitutionElement> stringsToSkip)`

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

      `addPropertiesValues, addProperty, addProperty, addTestElement, canRemove, clear, clearTemporary, clearTestElementChildren, clone, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, 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

      `removed`

- - ### Constructor Detail

    - #### CompareAssertion

          public CompareAssertion()

  - ### Method Detail

    - #### 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.

    - #### iterationStart

          public void iterationStart(LoopIterationEvent iterEvent)

      Description copied from interface: `LoopIterationListener`
      Called when a loop iteration is about to start.
      Specified by:
        `iterationStart` in interface `LoopIterationListener`
      Parameters:
        `iterEvent` - the event

    - #### isCompareContent

          public boolean isCompareContent()

      Returns:
        Returns the compareContent.

    - #### setCompareContent

          public void setCompareContent(boolean compareContent)

      Parameters:
        `compareContent` - The compareContent to set.

    - #### getCompareTime

          public long getCompareTime()

      Returns:
        Returns the compareTime.

    - #### setCompareTime

          public void setCompareTime(long compareTime)

      Parameters:
        `compareTime` - The compareTime to set.

    - #### getStringsToSkip

          public java.util.Collection<SubstitutionElement> getStringsToSkip()

      Returns:
        Returns the stringsToSkip.

    - #### setStringsToSkip

          public void setStringsToSkip(java.util.Collection<SubstitutionElement> stringsToSkip)

      Parameters:
        `stringsToSkip` - The stringsToSkip to set.

Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.