Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


I would like to probe our own map tile server and for this I'd like to have a loop from which I could request individual tiles, each time a different one. Our tile server is based on switch2osm and from outside could be proben with the HTTP requests having the pattern like this:

Where zoom is the zoom level, x is the horizontal tile index and y a vertical tile index. For testing this we've chosen Apache JMeter, however we cannot figure out, how to create a loop with the fixed range of iterations and use the iterator value in the HTTP request pattern. Is it possible to make a test plan like is shown in the following pseudo-plan ?

Test Plan
└ Thread Group
  └ X Loop from 1 to 100
    └ Y Loop from 1 to 100
      └ HTTP Request

And if so, is it possible to use the loop iterator values in the HTTP Request sampler Path parameter, like:



Is it possible to create a loop in JMeter's test plan and use its iterator value in the HTTP Request sampler Path parameter?

If it's possible, could someone sketch how such plan should look like and how to write the Path parameter of the HTTP Request sampler to use the iterator value ?


share|improve this question
up vote 4 down vote accepted

JMeter is an excellent choice for your requirements. JMeter has a loop controller:, you may want to add a counter or simply use a user defined variable. Both options will work. The easiest is using counters

- Thread Group
-- Loop A
--- Counter 1 (Var name: C1)
--- Loop B
---- Counter 2 (Var name: C2)
---- HTTP Sampler using ${C1} and ${C2}

you can use variables in the path. Let's assume you set a variable named: var1. You can then use ${var1} almost anywhere.You can see a more detailed example here:

share|improve this answer
Thanks a lot for this! – TLama Nov 4 '13 at 17:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.