public class DslCookieManager extends AutoEnabledHttpConfigElement
This element can only be added as child of test plan, and currently allows only to disable HTTP cookies handling which is enabled by default (emulating browser behavior).
This element has to be added before any http sampler to be considered, and if you add multiple instances of cookie manager to a test plan, only the first one will be considered.
| Modifier and Type | Class and Description |
|---|---|
static class |
DslCookieManager.CodeBuilder |
static class |
DslCookieManager.CookiePolicy |
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
clearEachIteration |
protected DslCookieManager.CookiePolicy |
cookiePolicy |
enabledguiClass, name| Constructor and Description |
|---|
DslCookieManager() |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.jmeter.testelement.TestElement |
buildTestElement() |
DslCookieManager |
clearCookiesBetweenIterations(boolean clear)
Allows to enable or disable clearing cookies between thread group iterations.
|
DslCookieManager |
cookiePolicy(DslCookieManager.CookiePolicy policy)
Used to set the required cookie policy used to manage cookies.
|
DslCookieManager |
disable()
Disables HTTP cookies handling for the test plan.
|
buildEndListener, buildTreeUnder, getOrCreateContextEntry, registerDependencybuildConfiguredTestElement, buildTestElementGui, configureTestElement, durationToSeconds, loadBeanProperties, showAndWaitFrameWith, showFrameWith, showInGui, showTestElementGuiclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitshowInGuiprotected DslCookieManager.CookiePolicy cookiePolicy
protected boolean clearEachIteration
public DslCookieManager disable()
public DslCookieManager clearCookiesBetweenIterations(boolean clear)
Cookies are cleared each iteration by default. If this is not desirable, for instance if logging in once and then iterating through actions multiple times, use this to set to false.
clear - boolean to set clearing of cookies. By default, it is set to true.public DslCookieManager cookiePolicy(DslCookieManager.CookiePolicy policy)
You might need to change the 'standard' cookie policy if the application under test only supports a specific cookie implementation.
policy - specifies the particular cookie policy to use. By default, it is set to standard
cookie policy.DslCookieManager.CookiePolicyprotected org.apache.jmeter.testelement.TestElement buildTestElement()
buildTestElement in class BaseTestElementCopyright © 2024. All rights reserved.