Class ResultSaver
-
- All Implemented Interfaces:
-
java.io.Serializable
,java.lang.Cloneable
,org.apache.jmeter.engine.util.NoThreadClone
,org.apache.jmeter.gui.Searchable
,org.apache.jmeter.samplers.SampleListener
,org.apache.jmeter.testelement.TestElement
,org.apache.jmeter.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
-
-
Field Summary
Fields Modifier and Type Field Description public final static String
FILENAME
public final static String
VARIABLE_NAME
public final static String
ERRORS_ONLY
public final static String
SUCCESS_ONLY
public final static String
SKIP_AUTO_NUMBER
public final static String
SKIP_SUFFIX
public final static String
ADD_TIMESTAMP
public final static String
NUMBER_PAD_LENGTH
public final static String
IGNORE_TC
private transient boolean
runningVersion
public transient JMeterContext
threadContext
public transient String
threadName
public final static TestElement.Companion
Companion
public final static String
NAME
public final static String
GUI_CLASS
public final static String
ENABLED
public final static String
TEST_CLASS
public final static String
COMMENTS
-
Constructor Summary
Constructors Constructor 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
Modifier and Type Method Description 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. 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
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. String
getFilename()
String
getVariableName()
boolean
getErrorsOnly()
boolean
getSkipAutoNumber()
boolean
getSkipSuffix()
boolean
getSuccessOnly()
boolean
getAddTimeStamp()
int
getNumberPadLen()
boolean
getIgnoreTC()
void
setIgnoreTC(boolean value)
void
setFilename(String value)
void
setAddTimestamp(boolean selected)
void
setVariableName(String value)
void
setNumberPadLength(String text)
void
setErrorsOnly(boolean selected)
void
setSuccessOnly(boolean selected)
void
setSkipSuffix(boolean selected)
void
setSkipAutoNumber(boolean selected)
-
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement
addTestElement, canRemove, clear, clearTestElementChildren, clone, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getPropertyOrNull, getSearchableTokens, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removeProperty, setComment, setEnabled, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse
-
Methods inherited from class org.apache.jmeter.testelement.TestElement
addTestElement, canRemove, clear, clearTestElementChildren, clone, get, get, get, get, get, get, get, get, get, getComment, getName, getOrCreate, getOrCreate, getOrNull, getOrNull, getOrNull, getProperty, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getPropertyOrNull, getProps, getSchema, getString, isEnabled, isRunningVersion, isTemporary, propertyIterator, recoverRunningVersion, removeProperty, removed, set, setComment, setEnabled, setName, setProperty, setTemporary, traverse
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
ResultSaver
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
ResultSaver(String name)
Constructor for use during startup (intended for non-GUI use)- Parameters:
name
- of summariser
-
-
Method Detail
-
testStarted
void testStarted()
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.
-
testStarted
void testStarted(String host)
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.
- Parameters:
host
- name of host
-
testEnded
void testEnded()
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.
-
testEnded
void testEnded(String host)
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.
- Parameters:
host
- name of host
-
sampleOccurred
void sampleOccurred(SampleEvent e)
Saves the sample result (and any sub results) in files
-
sampleStarted
void sampleStarted(SampleEvent e)
A sample has started.
-
sampleStopped
void sampleStopped(SampleEvent e)
A sample has stopped.
-
getFilename
String getFilename()
-
getVariableName
String getVariableName()
-
getErrorsOnly
boolean getErrorsOnly()
-
getSkipAutoNumber
boolean getSkipAutoNumber()
-
getSkipSuffix
boolean getSkipSuffix()
-
getSuccessOnly
boolean getSuccessOnly()
-
getAddTimeStamp
boolean getAddTimeStamp()
-
getNumberPadLen
int getNumberPadLen()
-
getIgnoreTC
boolean getIgnoreTC()
-
setIgnoreTC
void setIgnoreTC(boolean value)
-
setFilename
void setFilename(String value)
-
setAddTimestamp
void setAddTimestamp(boolean selected)
-
setVariableName
void setVariableName(String value)
-
setNumberPadLength
void setNumberPadLength(String text)
-
setErrorsOnly
void setErrorsOnly(boolean selected)
-
setSuccessOnly
void setSuccessOnly(boolean selected)
-
setSkipSuffix
void setSkipSuffix(boolean selected)
-
setSkipAutoNumber
void setSkipAutoNumber(boolean selected)
-
-
-
-