1 package ${package}.simple.examples;
3 import static java.util.Collections.singletonList;
5 import com.griddynamics.jagger.engine.e1.collector.CollectThreadsTestListener;
6 import com.griddynamics.jagger.engine.e1.collector.ExampleResponseValidatorProvider;
7 import com.griddynamics.jagger.engine.e1.collector.NotNullResponseValidator;
8 import com.griddynamics.jagger.engine.e1.collector.DefaultResponseValidatorProvider;
9 import com.griddynamics.jagger.engine.e1.collector.invocation.NotNullInvocationListener;
10 import com.griddynamics.jagger.engine.e1.collector.loadscenario.ExampleLoadScenarioListener;
11 import com.griddynamics.jagger.engine.e1.collector.testgroup.ExampleTestGroupListener;
12 import com.griddynamics.jagger.invoker.RoundRobinLoadBalancer;
13 import com.griddynamics.jagger.user.test.configurations.JLoadScenario;
14 import com.griddynamics.jagger.user.test.configurations.JLoadTest;
15 import com.griddynamics.jagger.user.test.configurations.JParallelTestsGroup;
16 import com.griddynamics.jagger.user.test.configurations.JTestDefinition;
17 import com.griddynamics.jagger.user.test.configurations.auxiliary.Id;
18 import com.griddynamics.jagger.user.test.configurations.limits.JLimit;
19 import com.griddynamics.jagger.user.test.configurations.limits.JLimitVsBaseline;
20 import com.griddynamics.jagger.user.test.configurations.limits.JLimitVsRefValue;
21 import com.griddynamics.jagger.user.test.configurations.limits.auxiliary.JMetricName;
22 import com.griddynamics.jagger.user.test.configurations.limits.auxiliary.LowErrThresh;
23 import com.griddynamics.jagger.user.test.configurations.limits.auxiliary.LowWarnThresh;
24 import com.griddynamics.jagger.user.test.configurations.limits.auxiliary.RefValue;
25 import com.griddynamics.jagger.user.test.configurations.limits.auxiliary.UpErrThresh;
26 import com.griddynamics.jagger.user.test.configurations.limits.auxiliary.UpWarnThresh;
27 import com.griddynamics.jagger.user.test.configurations.limits.auxiliary.RefValue;
28 import com.griddynamics.jagger.user.test.configurations.limits.auxiliary.UpErrThresh;
29 import com.griddynamics.jagger.user.test.configurations.limits.auxiliary.UpWarnThresh;
30 import com.griddynamics.jagger.user.test.configurations.load.JLoadProfile;
31 import com.griddynamics.jagger.user.test.configurations.load.JLoadProfileRps;
32 import com.griddynamics.jagger.user.test.configurations.load.auxiliary.RequestsPerSecond;
33 import com.griddynamics.jagger.user.test.configurations.loadbalancer.JLoadBalancer;
34 import com.griddynamics.jagger.user.test.configurations.termination.JTerminationCriteria;
35 import com.griddynamics.jagger.user.test.configurations.termination.JTerminationCriteriaBackground;
36 import com.griddynamics.jagger.user.test.configurations.termination.JTerminationCriteriaIterations;
37 import com.griddynamics.jagger.user.test.configurations.termination.auxiliary.IterationsNumber;
38 import com.griddynamics.jagger.user.test.configurations.termination.auxiliary.MaxDurationInSeconds;
39 import org.springframework.context.annotation.Bean;
40 import org.springframework.context.annotation.Configuration;
41 import ${package}.util.JaggerPropertiesProvider;
43 import static com.griddynamics.jagger.user.test.configurations.loadbalancer.JLoadBalancer.DefaultLoadBalancer.ROUND_ROBIN;
45 import java.util.Arrays;
61 String testDefinitionComment = getTestPropertyValue(
"example.jagger.test.definition.comment");
64 .
builder(
Id.
of(
"exampleJaggerTestDefinition"),
new EndpointsProvider())
66 .withComment(testDefinitionComment)
68 .withQueryProvider(
new QueriesProvider())
76 Long iterationsNumber = Long.valueOf(getTestPropertyValue(
"example.jagger.load.scenario.termination.iterations"));
77 Long maxDurationInSeconds = Long.valueOf(getTestPropertyValue(
"example.jagger.load.scenario.termination.max.duration.seconds"));
83 .withMaxLoadThreads(10)
111 .
builder(
Id.
of(
"exampleJaggerLoadTest"), jTestDefinition, jLoadProfileRps, jTerminationCriteria)
112 .addListener(
new CollectThreadsTestListener())
113 .withLimits(successRateLimit, throughputLimit, latencyPercentileLimit)
117 .
builder(
Id.
of(
"exampleJaggerParallelTestsGroup"), jLoadTest)
124 .withLatencyPercentiles(Arrays.asList(10D, 25.5D, 42D, 95D))
132 .
builder(
Id.
of(
"myFirstJaggerTestDefinition"),
new EndpointsProvider())
134 .withComment(
"no comments")