|
Apache JMeter | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jmeter.testelement.AbstractTestElement
org.apache.jmeter.config.ConfigTestElement
org.apache.jmeter.protocol.http.control.CookieManager
This class provides an interface to the netscape cookies file to pass cookies along with a request. Now uses Commons HttpClient parsing and matching code (since 2.1.2)
Field Summary | |
static String |
DEFAULT_POLICY
|
Fields inherited from class org.apache.jmeter.config.ConfigTestElement |
PASSWORD, USERNAME |
Fields inherited from interface org.apache.jmeter.testelement.TestElement |
COMMENTS, ENABLED, GUI_CLASS, NAME, TEST_CLASS |
Constructor Summary | |
CookieManager()
|
Method Summary | |
void |
add(Cookie c)
Add a cookie. |
void |
addCookieFromHeader(String cookieHeader,
URL url)
|
void |
addFile(String cookieFile)
Add cookie data from a file. |
void |
clear()
Clear the TestElement of all data. |
Object |
clone()
|
Cookie |
get(int i)
Return the cookie at index i. |
boolean |
getClearEachIteration()
|
int |
getCookieCount()
|
String |
getCookieHeaderForURL(URL url)
Find cookies applicable to the given URL and build the Cookie header from them. |
CollectionProperty |
getCookies()
|
org.apache.commons.httpclient.Cookie[] |
getCookiesForUrl(URL url)
Get array of valid HttpClient cookies for the URL |
String |
getPolicy()
|
void |
recoverRunningVersion()
Tells the test element to return to the state it was in when makeRunningVersion() was called. |
void |
remove(int index)
Remove a cookie. |
void |
save(String authFile)
Save the static cookie data to a file. |
void |
setClearEachIteration(boolean clear)
|
void |
setCookiePolicy(String policy)
|
void |
setRunningVersion(boolean running)
Sets the runningVersion. |
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 |
testIterationStart(LoopIterationEvent event)
Each time through a Thread Group's test script, an iteration event is fired for each thread. |
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. |
Methods inherited from class org.apache.jmeter.config.ConfigTestElement |
addConfigElement, addTestElement, expectsModification |
Methods inherited from class org.apache.jmeter.testelement.AbstractTestElement |
addProperty, canRemove, clearTemporary, emptyTemporary, equals, getComment, getName, getProperty, getPropertyAsBoolean, getPropertyAsBoolean, getPropertyAsDouble, getPropertyAsFloat, getPropertyAsInt, getPropertyAsInt, getPropertyAsLong, getPropertyAsString, getPropertyAsString, getThreadContext, getThreadName, hashCode, isEnabled, isRunningVersion, isTemporary, logProperties, mergeIn, propertyIterator, removeProperty, setComment, setName, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setProperty, setTemporary, setThreadContext, setThreadName, traverse, traverseCollection, traverseMap, traverseProperty |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String DEFAULT_POLICY
Constructor Detail |
public CookieManager()
Method Detail |
public Object clone()
clone
in interface ConfigElement
clone
in class AbstractTestElement
public String getPolicy()
public void setCookiePolicy(String policy)
public CollectionProperty getCookies()
public int getCookieCount()
public boolean getClearEachIteration()
public void setClearEachIteration(boolean clear)
public void save(String authFile) throws IOException
IOException
public void addFile(String cookieFile) throws IOException
IOException
public void recoverRunningVersion()
TestElement
recoverRunningVersion
in interface TestElement
recoverRunningVersion
in class AbstractTestElement
public void setRunningVersion(boolean running)
AbstractTestElement
setRunningVersion
in interface TestElement
setRunningVersion
in class AbstractTestElement
running
- the runningVersion to setpublic void add(Cookie c)
public void clear()
TestElement
clear
in interface TestElement
clear
in class AbstractTestElement
public void remove(int index)
public Cookie get(int i)
public org.apache.commons.httpclient.Cookie[] getCookiesForUrl(URL url)
url
- the target URL
public String getCookieHeaderForURL(URL url)
url
- URL of the request to which the returned header will be added.
public void addCookieFromHeader(String cookieHeader, URL url)
public void testStarted()
TestListener
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
in interface TestListener
StandardJMeterEngine.run()
public void testEnded()
TestListener
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
in interface TestListener
StandardJMeterEngine.stopTest()
public void testStarted(String host)
TestListener
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
in interface TestListener
StandardJMeterEngine.run()
public void testEnded(String host)
TestListener
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
in interface TestListener
StandardJMeterEngine.stopTest()
public void testIterationStart(LoopIterationEvent event)
TestListener
testIterationStart
in interface TestListener
event
-
|
Apache JMeter | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |