public class DslCounter extends BaseConfigElement
This element is handy for generating incremental IDs, positions in certain list, etc.
| Modifier and Type | Class and Description |
|---|---|
static class |
DslCounter.CodeBuilder |
guiClass, name| Constructor and Description |
|---|
DslCounter(String varName) |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.jmeter.testelement.TestElement |
buildTestElement() |
DslCounter |
increment(long inc)
Specifies how much the counter will increase in each iteration.
|
DslCounter |
maximumValue(long max)
Specifies the maximum value of the counter.
|
DslCounter |
perThread(boolean perThread)
Specifies to use a separate counter for each thread.
|
DslCounter |
startingValue(long start)
Allows specifying the starting value of the counter.
|
DslCounter |
startingValue(String start)
Same as
startingValue(long) but allowing to use JMeter expressions for starting
value. |
buildConfiguredTestElement, buildTestElementGui, buildTreeUnder, configureTestElement, durationToSeconds, loadBeanProperties, showAndWaitFrameWith, showFrameWith, showInGui, showTestElementGuiclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbuildTreeUnder, showInGuipublic DslCounter(String varName)
public DslCounter startingValue(long start)
start - specifies the value to start the counter with. When not specified, 0 will be
used.public DslCounter startingValue(String start)
startingValue(long) but allowing to use JMeter expressions for starting
value.
This method allows to extract the initial value of the counter for example from a JMeter property (eg: ${__P(COUNT_INIT)}).
start - specifies a jmeter expression evaluating to a number that specifies the initial
value for the counter.public DslCounter increment(long inc)
inc - specifies how much to increase the counter in each iteration. By default, 1.public DslCounter maximumValue(long max)
When the value exceeds this value, the counter is reset to its starting value.
max - specifies the maximum value to use. When not specified, Long.MAX_VALUE is
used.public DslCounter perThread(boolean perThread)
perThread - specifies to use a separate counter for each thread. When not specified, then
the counter is shared, and incremented, by all thread group threads. By
default, it is set to false.protected org.apache.jmeter.testelement.TestElement buildTestElement()
buildTestElement in class BaseTestElementCopyright © 2024. All rights reserved.