Emilio
Emilio

Reputation: 1044

JMeter CSV Looping two files

I'm trying to make a test plan for our new application, and we need to make requests as:

hhtp://appName/stations/${idStation}/variables/${idVariable}

For a full stress plan we want all possibilities, so we have defined two csvs one with stations ids and another one with variables ids:

idStations.csv
AA
BB
CC
DD
EE
FF

idVariables.csv
1
2
3

We already now how to combine csv in the same plan to have this combinations:

AA 1 BB 2 CC 3 DD 1 EE 2 FF 3

But what we really want is to do this combinations:

AA 1 AA 2 AA 3 BB 1 BB 2 BB 3 CC 1 CC 2 CC 3 DD 1 DD 2 DD 3 EE 1 EE 2 EE 3 FF 1 FF 2 FF 3

How can we do this in a clean way? thanks is advance!

Upvotes: 0

Views: 456

Answers (1)

vins
vins

Reputation: 15400

If you are looking for detailed steps, please check here.

http://www.testautomationguru.com/jmeter-looping-2-csv-files/


The answer here will work for your scenario as well.

nested loop with file1.csv and file2.csv in jmeter

I get the output as given below.

enter image description here

Settings

  • Thread Group is set to run forever

  • "CSV Data Set Config FileA" is set to

    TRUE for 'Stop Thread on EOF?'
    FALSE for 'Recycle on EOF'

  • Loop Controller Count is equal to the no of items in the FileB. You can parameterize it.

  • "CSV Data Set Config FileB" is set to

    FALSE for 'Stop Thread on EOF?'
    TRUE for 'Recycle on EOF'

Upvotes: 2

Related Questions