org.apache.jmeter.assertions
Class SizeAssertion
java.lang.Object
org.apache.jmeter.testelement.AbstractTestElement
org.apache.jmeter.testelement.AbstractScopedTestElement
org.apache.jmeter.testelement.AbstractScopedAssertion
org.apache.jmeter.assertions.SizeAssertion
- All Implemented Interfaces:
- Serializable, Cloneable, Assertion, Searchable, TestElement
public class SizeAssertion
- extends AbstractScopedAssertion
- implements Serializable, Assertion
Checks if the results of a Sample matches a particular size.
- See Also:
- Serialized Form
Methods inherited from class org.apache.jmeter.testelement.AbstractScopedTestElement |
fetchScope, getSampleList, getSearchableTokens, getVariableName, isScopeAll, isScopeChildren, isScopeParent, isScopeVariable, isScopeVariable, setScopeAll, setScopeChildren, setScopeParent, setScopeVariable |
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, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, recoverRunningVersion, removeProperty, setComment, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setRunningVersion, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traverseProperty |
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
SizeAssertion
public SizeAssertion()
getResult
public AssertionResult getResult(SampleResult response)
- Returns the result of the Assertion.
Here it checks the Sample responseData length.
- 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.
getAllowedSize
public String getAllowedSize()
- Returns the size in bytes to be asserted.
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(String size)
- Set the size that shall be asserted.
- Parameters:
size
- a number of bytes.
setAllowedSize
public void setAllowedSize(long size)
setTestFieldNetworkSize
public void setTestFieldNetworkSize()
setTestFieldResponseHeaders
public void setTestFieldResponseHeaders()
setTestFieldResponseBody
public void setTestFieldResponseBody()
setTestFieldResponseCode
public void setTestFieldResponseCode()
setTestFieldResponseMessage
public void setTestFieldResponseMessage()
getTestField
public String getTestField()
isTestFieldNetworkSize
public boolean isTestFieldNetworkSize()
isTestFieldResponseHeaders
public boolean isTestFieldResponseHeaders()
isTestFieldResponseBody
public boolean isTestFieldResponseBody()
isTestFieldResponseCode
public boolean isTestFieldResponseCode()
isTestFieldResponseMessage
public boolean isTestFieldResponseMessage()
Copyright © 1998-2012 Apache Software Foundation. All Rights Reserved.