Class AutoStopListener.AutoStopCondition
- java.lang.Object
-
- us.abstracta.jmeter.javadsl.core.listeners.AutoStopListener.AutoStopCondition
-
- Enclosing class:
- AutoStopListener
public static class AutoStopListener.AutoStopCondition extends Object
Specifies a condition that when met, will make test plan execution to stop.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AutoStopListener.TimeMetricConditionBuilderconnectionTime()Specifies to create a condition that evaluates connection time (time it takes to establish a connection with the service under test).static AutoStopListener.ErrorsConditionBuildererrors()Specifies to create a condition that evaluates the number of not successful samples.AutoStopListener.AutoStopConditionholdsFor(Duration duration)Specifies for how long the specified condition has to hold (be met) before the test plan execution is stopped.static AutoStopListener.TimeMetricConditionBuilderlatencyTime()Specifies to create a condition that evaluates latency time (time between last request byte is sent to service under test and first response byte is received).static AutoStopListener.CountMetricConditionBuilderreceivedBytes()Specifies to create a condition that evaluates the number bytes (response bytes) received from the service under test.static AutoStopListener.CountMetricConditionBuildersamples()Specifies to create a condition that evaluates the number of samples.static AutoStopListener.AutoStopConditionBuildersamplesMatching(String regex)Specifies a regular expression used to filter samples for which the condition will be evaluated.static AutoStopListener.TimeMetricConditionBuildersampleTime()Specifies to create a condition that evaluates sample time (time between last request byte is sent to service under test and last response byte is received).static AutoStopListener.CountMetricConditionBuildersentBytes()Specifies to create a condition that evaluates the number bytes sent (request bytes) to the service under test.
-
-
-
Method Detail
-
samplesMatching
public static AutoStopListener.AutoStopConditionBuilder samplesMatching(String regex)
Specifies a regular expression used to filter samples for which the condition will be evaluated.When the condition defines a regular expression, then the one specified in the autoStop listener is ignored.
This is handy in case you want to define a condition that apply only to a sub set of samples that share a common label structure. Eg: to samplers with same name but in different parts of test plan (e.g.: under different ifControllers).
For targeting a single sampler or all the samplers contained within a controller or thread group, prefer just placing the autoStop listener in the correct scope of the test plan.
- Parameters:
regex- specifies the regular expression to filter samples.- Returns:
- a condition builder to complete the condition definition.
-
sampleTime
public static AutoStopListener.TimeMetricConditionBuilder sampleTime()
Specifies to create a condition that evaluates sample time (time between last request byte is sent to service under test and last response byte is received).- Returns:
- a condition builder to complete the condition definition.
-
latencyTime
public static AutoStopListener.TimeMetricConditionBuilder latencyTime()
Specifies to create a condition that evaluates latency time (time between last request byte is sent to service under test and first response byte is received).- Returns:
- a condition builder to complete the condition definition.
-
connectionTime
public static AutoStopListener.TimeMetricConditionBuilder connectionTime()
Specifies to create a condition that evaluates connection time (time it takes to establish a connection with the service under test).- Returns:
- a condition builder to complete the condition definition.
-
samples
public static AutoStopListener.CountMetricConditionBuilder samples()
Specifies to create a condition that evaluates the number of samples.- Returns:
- a condition builder to complete the condition definition.
-
errors
public static AutoStopListener.ErrorsConditionBuilder errors()
Specifies to create a condition that evaluates the number of not successful samples.- Returns:
- a condition builder to complete the condition definition.
-
sentBytes
public static AutoStopListener.CountMetricConditionBuilder sentBytes()
Specifies to create a condition that evaluates the number bytes sent (request bytes) to the service under test.- Returns:
- a condition builder to complete the condition definition.
-
receivedBytes
public static AutoStopListener.CountMetricConditionBuilder receivedBytes()
Specifies to create a condition that evaluates the number bytes (response bytes) received from the service under test.- Returns:
- a condition builder to complete the condition definition.
-
holdsFor
public AutoStopListener.AutoStopCondition holdsFor(Duration duration)
Specifies for how long the specified condition has to hold (be met) before the test plan execution is stopped.This is useful to avoid potential short temporal conditions that may need to be ignored.
- Parameters:
duration- specifies the duration to wait the condition to hold before stopping test plan execution.The granularity of the period has to be seconds or greater (milliseconds are ignored).
By default, it is set to 0, which means that it will stop test plan as soon as the condition is met.
- Returns:
- the condition for its usage.
-
-