I'm sure I've already done this in the past but somehow I cannot figure out how ;-) So, here's my problem:
I'm trying to create a JUnit test plan in which a HTTP request is modified each iteration by altering a specific parameter. So, for example in five iterations I want the following HTTP requests to be made:
http://localhost:8080/test/foo.html?id=1
http://localhost:8080/test/foo.html?id=2
http://localhost:8080/test/foo.html?id=3
http://localhost:8080/test/foo.html?id=4
...
I want to configure the identifier values globally for the test plan and use them within the HTTP request samplerer like this:
Path: /test/foo.html?id=${categoryId}
The question now: How do I configure the identifiers values globally (I do not want to use StringFromFile
) and how do I reference them in the sampler?
There are several ways you can do this.
Given you have an array of values you could:
You reference them exactly as you have listed: ${varName}