java.lang.Object
org.apache.jmeter.testelement.AbstractTestElement
org.apache.jmeter.assertions.SizeAssertion
- All Implemented Interfaces:
- Assertion, java.lang.Cloneable, java.io.Serializable, org.apache.jmeter.testelement.TestElement
- public class SizeAssertion
- extends org.apache.jmeter.testelement.AbstractTestElement
- implements java.io.Serializable, Assertion
Checks if the results of a Sample matches a particular size.
- Version:
- $Revision: 1.16 $, $Date: 2005/07/12 20:50:28 $
| Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement |
addProperty, addTestElement, canRemove, clear, clearTemporary, clone, emptyTemporary, equals, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getThreadContext, getThreadName, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, nextIsNull, propertyIterator, recoverRunningVersion, removeProperty, setName, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, threadFinished, threadStarted, traverse, traverseCollection, traverseMap, traverseProperty |
comparatorErrorMessage
private java.lang.String comparatorErrorMessage
EQUAL
public static final int EQUAL
- See Also:
- Constant Field Values
NOTEQUAL
public static final int NOTEQUAL
- See Also:
- Constant Field Values
GREATERTHAN
public static final int GREATERTHAN
- See Also:
- Constant Field Values
LESSTHAN
public static final int LESSTHAN
- See Also:
- Constant Field Values
GREATERTHANEQUAL
public static final int GREATERTHANEQUAL
- See Also:
- Constant Field Values
LESSTHANEQUAL
public static final int LESSTHANEQUAL
- See Also:
- Constant Field Values
SIZE_KEY
private static final java.lang.String SIZE_KEY
- Key for storing assertion-informations in the jmx-file.
- See Also:
- Constant Field Values
OPERATOR_KEY
private static final java.lang.String OPERATOR_KEY
- See Also:
- Constant Field Values
resultData
byte[] resultData
SizeAssertion
public SizeAssertion()
getResult
public AssertionResult getResult(org.apache.jmeter.samplers.SampleResult response)
- Returns the result of the Assertion. Here it checks wether the Sample
took to long to be considered successful. If so an AssertionResult
containing a FailureMessage will be returned. Otherwise the returned
AssertionResult will reflect the success of the Sample.
- Specified by:
getResult in interface Assertion
getAllowedSize
public long getAllowedSize()
- Returns the size in bytes to be asserted. A duration of 0 indicates this
assertion is to be ignored.
setCompOper
public void setCompOper(int operator)
- set the Operator
getCompOper
public int getCompOper()
- Returns the operator to be asserted. EQUAL = 1, NOTEQUAL = 2 GREATERTHAN =
3,LESSTHAN = 4,GREATERTHANEQUAL = 5,LESSTHANEQUAL = 6
setAllowedSize
public void setAllowedSize(long size)
throws java.lang.IllegalArgumentException
- Set the size that shall be asserted.
compareSize
private boolean compareSize(long resultSize)
- Compares the the size of a return result to the set allowed size using a
logical comparator set in setLogicalComparator().
Possible values are: equal, not equal, greater than, less than, greater
than eqaul, less than equal, .