Class PercentController
- java.lang.Object
-
- us.abstracta.jmeter.javadsl.core.testelements.BaseTestElement
-
- us.abstracta.jmeter.javadsl.core.testelements.TestElementContainer<T,BaseThreadGroup.ThreadGroupChild>
-
- us.abstracta.jmeter.javadsl.core.controllers.BaseController<PercentController>
-
- us.abstracta.jmeter.javadsl.core.controllers.PercentController
-
- All Implemented Interfaces:
DslController,DslTestElement,BaseThreadGroup.ThreadGroupChild
public class PercentController extends BaseController<PercentController>
Allows running only given percent of times given test plan elements.Internally this uses JMeter Throughput Controller (which has misleading name) with percent executions option.
The execution of elements is deterministic, holding execution until percentage is reached. For example, if the percent is 25, the execution of child elements will look like: [skip, skip, skip, run, skip, skip, skip, run, ...].
Execution of children is always run as an atomic set (each time/iteration either all or none of the children are run).
- Since:
- 0.25
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPercentController.CodeBuilder
-
Field Summary
Fields Modifier and Type Field Description protected Stringpercentprotected booleanperThread-
Fields inherited from class us.abstracta.jmeter.javadsl.core.testelements.TestElementContainer
children
-
Fields inherited from class us.abstracta.jmeter.javadsl.core.testelements.BaseTestElement
guiClass, name
-
-
Constructor Summary
Constructors Constructor Description PercentController(String percent, List<BaseThreadGroup.ThreadGroupChild> children)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.jmeter.testelement.TestElementbuildTestElement()PercentControllerperThread()Specifies to apply percent control per thread instead of shared by all threads.PercentControllerperThread(boolean enable)Same asperThread()but allowing to enable or disable it.-
Methods inherited from class us.abstracta.jmeter.javadsl.core.controllers.BaseController
children
-
Methods inherited from class us.abstracta.jmeter.javadsl.core.testelements.TestElementContainer
buildTreeUnder
-
Methods inherited from class us.abstracta.jmeter.javadsl.core.testelements.BaseTestElement
buildConfiguredTestElement, buildTestElementGui, configureTestElement, durationToSeconds, loadBeanProperties, showAndWaitFrameWith, showFrameWith, showInGui, showTestElementGui
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface us.abstracta.jmeter.javadsl.core.DslTestElement
buildTreeUnder, showInGui
-
-
-
-
Field Detail
-
percent
protected String percent
-
perThread
protected boolean perThread
-
-
Constructor Detail
-
PercentController
public PercentController(String percent, List<BaseThreadGroup.ThreadGroupChild> children)
-
-
Method Detail
-
perThread
public PercentController perThread()
Specifies to apply percent control per thread instead of shared by all threads.This might be useful when a more deterministic behavior is required per thread, and each thread execution has to be controlled, instead of relying on in general threads execution percentage.
- Returns:
- the controller for further configuration or usage.
- Since:
- 1.0
-
perThread
public PercentController perThread(boolean enable)
Same asperThread()but allowing to enable or disable it.This is helpful when the resolution is taken at runtime.
- Parameters:
enable- specifies to enable or disable the setting. By default, it is set to false.- Returns:
- the controller for further configuration or usage.
- Since:
- 0.63
- See Also:
perThread()
-
buildTestElement
protected org.apache.jmeter.testelement.TestElement buildTestElement()
- Specified by:
buildTestElementin classBaseTestElement
-
-