abstracta / jmeter-java-dsl

Simple JMeter performance tests API
https://abstracta.github.io/jmeter-java-dsl/
Apache License 2.0
477 stars 59 forks source link

Support both a number of iterations and Duration #242

Closed Melanie-RK closed 10 months ago

Melanie-RK commented 1 year ago

In JMeter I can set both a number of iterations and specify a thread lifetime (Duration) for a ThreadGroup, however, the DSL currently does not support this.

Use case:

I specify the thread lifetime to make sure a test does not exceed a certain duration

Screenshot: issue_screenshot

rabelenda commented 1 year ago

Thank you for asking for this!

This is an interesting use case. Anyone else with the same need?

We may implement something like:

threadGroup()
 .rampTo(1, Duration.ofSeconds(1))
 .holdIterating(30)
 .upTo(Duration.ofMinutes(200))

Any other ideas or comments?

Melanie-RK commented 1 year ago

That looks good to me, very easy to see at a glance what it does

rabelenda commented 10 months ago

This has been added on latest release