apache / apache/jmeter

Support dynamic arguments: http sampler might need variable number of arguments depending on the previous steps

Open
#5,998 0 comments 1 reaction 0 assignees View on GitHub
enhancement to-triage
Dominant language
Java
Stars
9.5k
Forks
2.3k
Avg merge
1d 22h
Merged PRs (30d)
5

Description

### Use case

Http call: `/api/delete?param1=1¶m2=2¶m3=3......`

In other words, the use case is like "here's a set of name-value pairs, pass them as parameters".

See also:
* https://github.com/apache/jmeter/issues/4750

### Possible solution

Currently, JMeter allows using `${...}` functions and expressions for both param names and values, however, there's no way to "add/remove" parameter rows with expressions.
We might either implement a separate field for "parameter array", or something like that.

Of course, users might attempt modifying the sampler with JSR223 preprocessor, however, I think we should refrain from the design where users treat TestElements as mutable in the runtime.
Ideally, we should treat TestElements as immutable, so we could reuse the same elements across threads, so we save on heap.

### Possible workarounds

A workaround might be building the path string with JSR223

### JMeter Version

5.5

### Java Version

_No response_

### OS Version

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.