Class HTTPSampleResult
-
- All Implemented Interfaces:
-
java.io.Serializable
,java.lang.Cloneable
,org.apache.jmeter.gui.Searchable
public class HTTPSampleResult extends SampleResult
This is a specialisation of the SampleResult class for the HTTP protocol.
-
-
Field Summary
Fields Modifier and Type Field Description public String
cookies
public String
redirectLocation
public String
queryString
public final static String
DEFAULT_HTTP_ENCODING
public final static String
TEXT
public final static String
BINARY
public SampleSaveConfiguration
saveConfig
public SampleResult
parent
public Array<byte>
responseData
public String
responseCode
public String
resultFileName
public String
samplerData
public String
threadName
public String
responseMessage
public String
responseHeaders
public String
requestHeaders
public long
timeStamp
public long
startTime
public long
endTime
public long
idleTime
public String
dataType
public String
contentType
public long
latency
public long
connectTime
public JMeterContext.TestLogicalAction
testLogicalAction
public int
sampleCount
public int
headersSize
public volatile int
groupThreads
public volatile int
allThreads
public long
sentBytes
public transient volatile String
responseDataAsString
-
Constructor Summary
Constructors Constructor Description HTTPSampleResult()
HTTPSampleResult(long elapsed)
HTTPSampleResult(HTTPSampleResult res)
Construct a 'parent' result for an already-existing result, essentially cloning it
-
Method Summary
Modifier and Type Method Description String
getCookies()
void
setCookies(String string)
String
getRedirectLocation()
void
setRedirectLocation(String redirectLocation)
String
getQueryString()
Fetch the query string void
setQueryString(String string)
Save the query string void
setHTTPMethod(String method)
String
getHTTPMethod()
boolean
isRedirect()
Determine whether this result is a redirect. String
getSamplerData()
Overrides version in Sampler data to provide more details String
getDataEncodingWithDefault(String defaultEncoding)
Overrides the method from SampleResult - so the encoding can be extracted from the Meta content-type if necessary. String
getDataEncodingNoDefault()
Overrides the method from SampleResult - so the encoding can be extracted from the Meta content-type if necessary. void
setResponseNoContent()
List<String>
getSearchableTokens()
-
Methods inherited from class org.apache.jmeter.samplers.SampleResult
addAssertionResult, addRawSubResult, addSubResult, cleanAfterSample, clone, connectEnd, createTestSample, currentTimeInMillis, getAllThreads, getAssertionResults, getBodySize, getBodySizeAsLong, getBytes, getBytesAsLong, getConnectTime, getContentType, getDataEncodingWithDefault, getDataType, getEndTime, getErrorCount, getFirstAssertionFailureMessage, getGroupThreads, getHeadersSize, getIdleTime, getLatency, getMediaType, getParent, getRequestHeaders, getResponseCode, getResponseData, getResponseDataAsString, getResponseHeaders, getResponseMessage, getResultFileName, getSampleCount, getSampleLabel, getSamplerData, getSaveConfig, getSentBytes, getStartTime, getSubResults, getTestLogicalAction, getThreadName, getTime, getTimeStamp, getURL, getUrlAsString, isBinaryType, isIgnore, isMonitor, isRenameSampleLabel, isResponseCodeOK, isStampedAtStart, isStartNextThreadLoop, isStopTest, isStopTestNow, isStopThread, isSuccessful, latencyEnd, markFile, removeAssertionResults, removeSubResults, sampleEnd, samplePause, sampleResume, sampleStart, setAllThreads, setBodySize, setBytes, setConnectTime, setContentType, setDataEncoding, setDataType, setEncodingAndType, setEndTime, setErrorCount, setGroupThreads, setHeadersSize, setIdleTime, setIgnore, setLatency, setMonitor, setParent, setRequestHeaders, setResponseCode, setResponseCodeOK, setResponseData, setResponseHeaders, setResponseMessage, setResponseMessageOK, setResponseOK, setResultFileName, setSampleCount, setSampleLabel, setSamplerData, setSaveConfig, setSentBytes, setStampAndTime, setStartNextThreadLoop, setStopTest, setStopTestNow, setStopThread, setSuccessful, setTestLogicalAction, setThreadName, setTimeStamp, setURL, storeSubResult, toDebugString, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
HTTPSampleResult
HTTPSampleResult()
-
HTTPSampleResult
HTTPSampleResult(long elapsed)
-
HTTPSampleResult
HTTPSampleResult(HTTPSampleResult res)
Construct a 'parent' result for an already-existing result, essentially cloning it- Parameters:
res
- existing sample result
-
-
Method Detail
-
getCookies
String getCookies()
-
setCookies
void setCookies(String string)
- Parameters:
string
- representing the cookies
-
getRedirectLocation
String getRedirectLocation()
-
setRedirectLocation
void setRedirectLocation(String redirectLocation)
-
getQueryString
String getQueryString()
Fetch the query string
-
setQueryString
void setQueryString(String string)
Save the query string
- Parameters:
string
- the query string
-
setHTTPMethod
void setHTTPMethod(String method)
-
getHTTPMethod
String getHTTPMethod()
-
isRedirect
boolean isRedirect()
Determine whether this result is a redirect.
If status is
Returns true for: 301, 302, 303, 307 (GET or HEAD) and 308307
, the request has to be a HTTP method ofGET
orHEAD
, to be considered a redirect. For all other status codes, the HTTP method will not be checked.
-
getSamplerData
String getSamplerData()
Overrides version in Sampler data to provide more details
-
getDataEncodingWithDefault
String getDataEncodingWithDefault(String defaultEncoding)
Overrides the method from SampleResult - so the encoding can be extracted from the Meta content-type if necessary. Updates the dataEncoding field if the content-type is found.
- Parameters:
defaultEncoding
- Default encoding used if there is no data encoding
-
getDataEncodingNoDefault
String getDataEncodingNoDefault()
Overrides the method from SampleResult - so the encoding can be extracted from the Meta content-type if necessary. Updates the dataEncoding field if the content-type is found.
-
setResponseNoContent
void setResponseNoContent()
-
getSearchableTokens
List<String> getSearchableTokens()
-
-
-
-