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

Overloading DslVariables constructor to allow element name to be specified #268

Closed andy-tarr closed 5 months ago

andy-tarr commented 6 months ago

…ified

rabelenda commented 6 months ago

Hello, thank you for contributing this pull request.

What is the main reason behind adding a name to the element? Can you provide examples? In general we have decided to provide methods to specify names only to scenarios that the name has some functional effect on the test plan (eg: name of a generated variable or log), to keep the number of methods in the API short.

andy-tarr commented 6 months ago

Hi, the main reason is that our tests have different sets of variables such as environment variables and post body request variables which we want to keep separate. Having 2 UDVs called the same thing in the test plan isn't great for an engineer trying to debug an issue

rabelenda commented 6 months ago

Maybe you need to refresh my memory, but are you using something outside of jmdsl itself? I mean, are you using saveToJMx or showInGrui? If so I guess is due to some JMeter background experience, because you could debug your test plan in your IDE without the need to rely in JMeter gui and that way names have no much use, at least from what comes to my mind now.

andy-tarr commented 6 months ago

yes, we are using saveToJmx

andy-tarr commented 5 months ago

@rabelenda could this be merged please? We are generating jmxs using the dsl and running from our pipeline on BlazeMeter via taurus (overriding jmeter variables/properties based on ephemeral test env host and data. I don't think the java-dsl-blazemeter provides support to override variables/properties, unless i've missed it? We're also naming reports, tagging reports etc etc.