Manish Sapariya
Manish Sapariya

Reputation: 3605

understanding one of "jMeter - Reducing resource requirements" recommendation

Can somebody please explain following recommendation on http://jmeter.apache.org/usermanual/best-practices.html#lean_mean

Rather than using lots of similar samplers, use the same sampler in a loop, and use variables (CSV Data Set) to vary the sample. Or perhaps use the Access Log Sampler. [The Include Controller does not help here, as it adds all the test elements in the file to the test plan.]

Upvotes: 1

Views: 151

Answers (1)

UBIK LOAD PACK
UBIK LOAD PACK

Reputation: 34566

This is intended to fix the following:

Suppose you have 2 requests:

test?name=toto

test?name=titi

A basic and bad way to do it would be to create 2 Http Requests one with each request above.

What recommandation says is:

  • create 1 Http Request with:

test?name=${value}

And create a CSV Dataset with a one column data and a variable named:

value

CSV file will contain:

  • toto
  • titi

And use 2 iterations, which will do exactly the same.

Of course here you have 2 rows, but in real life you would have hundreds or thousands.

Upvotes: 2

Related Questions