Class DslSimpleThreadGroup<T extends DslSimpleThreadGroup<T>>
- 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.threadgroups.BaseThreadGroup<T>
-
- us.abstracta.jmeter.javadsl.core.threadgroups.DslSimpleThreadGroup<T>
-
- Type Parameters:
T- is the type of the thread group. Used for proper contract definition of fluent builder methods.
- All Implemented Interfaces:
DslTestElement,DslTestPlan.TestPlanChild,DslThreadGroup
- Direct Known Subclasses:
DslSetupThreadGroup,DslTeardownThreadGroup
public abstract class DslSimpleThreadGroup<T extends DslSimpleThreadGroup<T>> extends BaseThreadGroup<T>
Contains common logic for thread groups that only require children in constructor and provide simple settings (like iterations, threads, etc).- Since:
- 0.33
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classDslSimpleThreadGroup.SimpleThreadGroupCodeBuilder<T extends org.apache.jmeter.testelement.TestElement>-
Nested classes/interfaces inherited from class us.abstracta.jmeter.javadsl.core.threadgroups.BaseThreadGroup
BaseThreadGroup.SampleErrorAction, BaseThreadGroup.ThreadGroupChild
-
-
Field Summary
Fields Modifier and Type Field Description protected intiterationsprotected intthreadCount-
Fields inherited from class us.abstracta.jmeter.javadsl.core.threadgroups.BaseThreadGroup
sampleErrorAction
-
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 Modifier Constructor Description protectedDslSimpleThreadGroup(String name, Class<? extends org.apache.jmeter.gui.JMeterGUIComponent> guiClass, List<BaseThreadGroup.ThreadGroupChild> children)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract org.apache.jmeter.threads.AbstractThreadGroupbuildSimpleThreadGroup()protected org.apache.jmeter.threads.AbstractThreadGroupbuildThreadGroup()Tchildren(BaseThreadGroup.ThreadGroupChild... children)Allows specifying thread group children elements (samplers, listeners, post processors, etc.).Titerations(int iterations)Allows specifying the number of iterations (times) to run the child elements of the thread group for each configured thread.TthreadCount(int threadCount)Allows specifying the number of threads to run in parallel iterations of provided tasks.-
Methods inherited from class us.abstracta.jmeter.javadsl.core.threadgroups.BaseThreadGroup
buildLoadTimeline, buildTestElement, sampleErrorAction
-
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
-
-
-
-
Constructor Detail
-
DslSimpleThreadGroup
protected DslSimpleThreadGroup(String name, Class<? extends org.apache.jmeter.gui.JMeterGUIComponent> guiClass, List<BaseThreadGroup.ThreadGroupChild> children)
-
-
Method Detail
-
iterations
public T iterations(int iterations)
Allows specifying the number of iterations (times) to run the child elements of the thread group for each configured thread.- Parameters:
iterations- contains number of iterations to run in each thread of the thread group. When -1 is specified, then the thread group will have no limit of iterations and will run until some other condition (like on error and stopping on error is configured) stops the thread group. By default, this value is initialized to 1.- Returns:
- the thread group for further configuration or usage.
-
threadCount
public T threadCount(int threadCount)
Allows specifying the number of threads to run in parallel iterations of provided tasks.- Parameters:
threadCount- is the number of threads to use. By default is 1.- Returns:
- the thread group for further configuration or usage.
-
children
public T children(BaseThreadGroup.ThreadGroupChild... children)
Allows specifying thread group children elements (samplers, listeners, post processors, etc.).This method is just an alternative to the constructor specification of children, and is handy when you want to keep general thread group settings together and then specify children (instead of specifying children and at the end alternative settings like iterations).
- Overrides:
childrenin classBaseThreadGroup<T extends DslSimpleThreadGroup<T>>- Parameters:
children- list of test elements to add as children of the thread group.- Returns:
- the altered thread group to allow for fluent API usage.
-
buildThreadGroup
protected org.apache.jmeter.threads.AbstractThreadGroup buildThreadGroup()
- Specified by:
buildThreadGroupin classBaseThreadGroup<T extends DslSimpleThreadGroup<T>>
-
buildSimpleThreadGroup
protected abstract org.apache.jmeter.threads.AbstractThreadGroup buildSimpleThreadGroup()
-
-