Closed yioyoiyioys222 closed 11 months ago
Hello @yioyoiyioys222. Thanks for asking about this.
Is there any particular scenario that you would like the DSL to support?
You can achieve the same as stepping thread group with existing api, with a little of java code.
For example, to create a thread group that creates 100 threads with 10 threads every 10 seconds using ramp ups of 2 seconds with an initial delay of 5 seconds, holds final load for 30 seconds, and ramp down all threads in 5 seconds you could do something like this:
DslDefaultThreadGroup tg = threadGroup()
.holdFor(Duration.ofSeconds(5));
for (int i=0; i < 100/10; i++) {
tg.rampToAndHold(10, Duration.ofSeconds(2), Duration.ofSeconds(10));
}
tg.holdFor(Duration.ofSeconds(30 - 10))
.rampTo(0, Duration.ofSeconds(5));
testPlan(
tg.children(
httpSampler("http://example.com")
)
).run();
Okay, thank you.
Screenshot: