Skip to content

Commit

Permalink
Overloading DslVariables constructor to allow element name to be spec…
Browse files Browse the repository at this point in the history
…ified (#268)

Co-authored-by: andy.tarr <andy.tarr@anaplan.com>
  • Loading branch information
andy-tarr and andytarr authored Jun 4, 2024
1 parent 0f590ac commit d185142
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,19 @@ public static DslVariables vars() {
return new DslVariables();
}

/**
* Same as {@link #vars()} but allowing to set a name on the element.
* <p>
* The name is used to easily identify what the variables are being used for in the jmx.
*
* @see #vars() (String)
* @since 0.22
**/

public static DslVariables vars(String name) {
return new DslVariables(name);
}

/**
* Builds a JSR223 Sampler which allows sampling any Java API or custom logic.
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ public DslVariables() {
super("User Defined Variables", ArgumentsPanel.class);
}

public DslVariables(String name) {
super(name, ArgumentsPanel.class);
}

/**
* Allows setting a JMeter thread variable.
* <p>
Expand Down

0 comments on commit d185142

Please sign in to comment.