# Class ResultSaver

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

All Implemented Interfaces:
  `Serializable, Cloneable, Searchable, SampleListener, TestElement`

public class ResultSaver extends AbstractTestElement implements Serializable, SampleListener
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
Description
`static final String`
`ADD_TIMESTAMP`
`static final String`
`ERRORS_ONLY`
`static final String`
`FILENAME`
`static final String`
`NUMBER_PAD_LENGTH`
`static final String`
`SKIP_AUTO_NUMBER`
`static final String`
`SKIP_SUFFIX`
`static final String`
`SUCCESS_ONLY`
`static final String`
`VARIABLE_NAME`

### Fields inherited from interface TestElement

`COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS`

## Constructor Summary

Constructors
Constructor
Description
`ResultSaver()`
`ResultSaver(String name)`

## Method Summary

Modifier and Type
Method
Description
`void`
`clear()`
Clear the TestElement of all data.
`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.

### Methods inherited from class AbstractTestElement

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

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

## Field Details

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

## Constructor Details

### ResultSaver

public ResultSaver()

### ResultSaver

public ResultSaver(String name)

## Method Details

### clear

public void clear()
Description copied from class: `AbstractTestElement`
Clear the TestElement of all data.

Specified by:
  `clear` in interface `TestElement`
Overrides:
  `clear` in class `AbstractTestElement`

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