jmeter-java-dsl icon indicating copy to clipboard operation
jmeter-java-dsl copied to clipboard

Anyway to fetch and update existing threadgroup from testplan (fromJmx) ?

Open ihsaddamhussain opened this issue 10 months ago • 1 comments

Hi, I have a usecase to override existing load configuration of ThreadGroup from jmx file

I get the jmx test plan by doing below DslTestPlan testPlan = DslTestPlan.fromJmx(jmxPath); How can I fetch the existing thread groups from this test plan ? I see the testplan olnly has .children() method where I can only add new thread group.

ihsaddamhussain avatar Jan 27 '25 08:01 ihsaddamhussain

Hello, thank you for trying.

JMeter DSL API is focused on test plan creation and execution, but not in modifying an existing test plan.

I think the best thing would be for your JMX test plan to have parameterized properties so you can later on change them if you need, for example using JMeter Properties. If you have that setting JMeter properties in JMeter DSL execution is very simple.

Have you considered migrating your JMX test plans to JMeter DSL code with jmsdl jmx2dsl command?

rabelenda avatar Jan 27 '25 15:01 rabelenda