org.apache.jmeter.reporters

## Class ResultSaver

- java.lang.Object
- - org.apache.jmeter.testelement.AbstractTestElement
  - - org.apache.jmeter.reporters.ResultSaver

- All Implemented Interfaces:
    Serializable, Cloneable, NoThreadClone, Searchable, SampleListener, TestElement, TestStateListener

      public class ResultSaver
      extends AbstractTestElement
      implements NoThreadClone, Serializable, SampleListener, TestStateListener

  Save Result responseData to a set of files This is mainly intended for validation tests
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `ADD_TIMESTAMP`
    `static String` | `ERRORS_ONLY`
    `static String` | `FILENAME`
    `static String` | `IGNORE_TC`
    `static String` | `NUMBER_PAD_LENGTH`
    `static String` | `SKIP_AUTO_NUMBER`
    `static String` | `SKIP_SUFFIX`
    `static String` | `SUCCESS_ONLY`
    `static String` | `VARIABLE_NAME`

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

      `COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ResultSaver()` Constructor is initially called once for each occurrence in the test plan For GUI, several more instances are created Then clear is called at start of test Called several times during test startup The name will not necessarily have been set at this point.
    `ResultSaver(String name)` Constructor for use during startup (intended for non-GUI use)

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)`
    `boolean` | `getAddTimeStamp()`
    `boolean` | `getErrorsOnly()`
    `String` | `getFilename()`
    `boolean` | `getIgnoreTC()`
    `int` | `getNumberPadLen()`
    `boolean` | `getSkipAutoNumber()`
    `boolean` | `getSkipSuffix()`
    `boolean` | `getSuccessOnly()`
    `String` | `getVariableName()`
    `int` | `hashCode()`
    `void` | `sampleOccurred(SampleEvent e)` Saves the sample result (and any sub results) in files
    `void` | `sampleStarted(SampleEvent e)` A sample has started.
    `void` | `sampleStopped(SampleEvent e)` A sample has stopped.
    `void` | `setAddTimestamp(boolean selected)`
    `void` | `setErrorsOnly(boolean selected)`
    `void` | `setFilename(String value)`
    `void` | `setIgnoreTC(boolean value)`
    `void` | `setNumberPadLength(String text)`
    `void` | `setSkipAutoNumber(boolean selected)`
    `void` | `setSkipSuffix(boolean selected)`
    `void` | `setSuccessOnly(boolean selected)`
    `void` | `setVariableName(String value)`
    `void` | `testEnded()` Called once for all threads after the end of a test.
    `void` | `testEnded(String host)` Called once for all threads after the end of a test.
    `void` | `testStarted()` Called just before the start of the test from the main engine thread.
    `void` | `testStarted(String host)` Called just before the start of the test from the main engine thread.

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

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

- - ### Field Detail

    - #### FILENAME

          public static final String FILENAME

      See Also:
        Constant Field Values

    - #### VARIABLE_NAME

          public static final String VARIABLE_NAME

      See Also:
        Constant Field Values

    - #### ERRORS_ONLY

          public static final String ERRORS_ONLY

      See Also:
        Constant Field Values

    - #### SUCCESS_ONLY

          public static final String SUCCESS_ONLY

      See Also:
        Constant Field Values

    - #### SKIP_AUTO_NUMBER

          public static final String SKIP_AUTO_NUMBER

      See Also:
        Constant Field Values

    - #### SKIP_SUFFIX

          public static final String SKIP_SUFFIX

      See Also:
        Constant Field Values

    - #### ADD_TIMESTAMP

          public static final String ADD_TIMESTAMP

      See Also:
        Constant Field Values

    - #### NUMBER_PAD_LENGTH

          public static final String NUMBER_PAD_LENGTH

      See Also:
        Constant Field Values

    - #### IGNORE_TC

          public static final String IGNORE_TC

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ResultSaver

          public ResultSaver()

      Constructor is initially called once for each occurrence in the test plan For GUI, several more instances are created Then clear is called at start of test Called several times during test startup The name will not necessarily have been set at this point.

    - #### ResultSaver

          public ResultSaver(String name)

      Constructor for use during startup (intended for non-GUI use)
      Parameters:
        `name` - of summariser

  - ### Method Detail

    - #### testStarted

          public void testStarted()

      Description copied from interface: `TestStateListener`

      Called just before the start of the test from the main engine thread. This is before the test elements are cloned. Note that not all the test variables will have been set up at this point.

      N.B. testStarted() and testEnded() are called from different threads.

      Specified by:
        `testStarted` in interface `TestStateListener`
      See Also:
        `StandardJMeterEngine.run()`

    - #### testStarted

          public void testStarted(String host)

      Description copied from interface: `TestStateListener`

      Called just before the start of the test from the main engine thread. This is before the test elements are cloned. Note that not all the test variables will have been set up at this point.

      N.B. testStarted() and testEnded() are called from different threads.

      Specified by:
        `testStarted` in interface `TestStateListener`
      Parameters:
        `host` - name of host
      See Also:
        `StandardJMeterEngine.run()`

    - #### testEnded

          public void testEnded()

      Description copied from interface: `TestStateListener`

      Called once for all threads after the end of a test. This will use the same element instances as at the start of the test.

      N.B. testStarted() and testEnded() are called from different threads.

      Specified by:
        `testEnded` in interface `TestStateListener`
      See Also:
        `StandardJMeterEngine.stopTest()`

    - #### testEnded

          public void testEnded(String host)

      Description copied from interface: `TestStateListener`

      Called once for all threads after the end of a test. This will use the same element instances as at the start of the test.

      N.B. testStarted() and testEnded() are called from different threads.

      Specified by:
        `testEnded` in interface `TestStateListener`
      Parameters:
        `host` - name of host
      See Also:
        `StandardJMeterEngine.stopTest()`

    - #### sampleOccurred

          public void sampleOccurred(SampleEvent e)

      Saves the sample result (and any sub results) in files
      Specified by:
        `sampleOccurred` in interface `SampleListener`
      Parameters:
        `e` - the `SampleEvent` that has occurred
      See Also:
        `SampleListener.sampleOccurred(org.apache.jmeter.samplers.SampleEvent)`

    - #### sampleStarted

          public void sampleStarted(SampleEvent e)

      A sample has started.
      Specified by:
        `sampleStarted` in interface `SampleListener`
      Parameters:
        `e` - the `SampleEvent` that has started

    - #### sampleStopped

          public void sampleStopped(SampleEvent e)

      A sample has stopped.
      Specified by:
        `sampleStopped` in interface `SampleListener`
      Parameters:
        `e` - the `SampleEvent` that has stopped

    - #### getFilename

          public String getFilename()

    - #### getVariableName

          public String getVariableName()

    - #### getErrorsOnly

          public boolean getErrorsOnly()

    - #### getSkipAutoNumber

          public boolean getSkipAutoNumber()

    - #### getSkipSuffix

          public boolean getSkipSuffix()

    - #### getSuccessOnly

          public boolean getSuccessOnly()

    - #### getAddTimeStamp

          public boolean getAddTimeStamp()

    - #### getNumberPadLen

          public int getNumberPadLen()

    - #### getIgnoreTC

          public boolean getIgnoreTC()

    - #### setIgnoreTC

          public void setIgnoreTC(boolean value)

    - #### setFilename

          public void setFilename(String value)

    - #### hashCode

          public int hashCode()

      Description copied from class: `AbstractTestElement`
      Overrides:
        `hashCode` in class `AbstractTestElement`

    - #### equals

          public boolean equals(Object obj)

      Description copied from class: `AbstractTestElement`
      Overrides:
        `equals` in class `AbstractTestElement`

    - #### setAddTimestamp

          public void setAddTimestamp(boolean selected)

    - #### setVariableName

          public void setVariableName(String value)

    - #### setNumberPadLength

          public void setNumberPadLength(String text)

    - #### setErrorsOnly

          public void setErrorsOnly(boolean selected)

    - #### setSuccessOnly

          public void setSuccessOnly(boolean selected)

    - #### setSkipSuffix

          public void setSkipSuffix(boolean selected)

    - #### setSkipAutoNumber

          public void setSkipAutoNumber(boolean selected)

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