0
votes

Hi i'm using jmeter to test a restapi. the test query is http:hostname:port\resource?{parameter}={value}

In this parameter comes from a csv file which contains first column as search parameter and second column as another csv file name or path which contain the values to be filled up in value of query.

how to do that?

eg: csv 1: col1: parameter1 col2: path of csv2 inside csv2: col1: value1, value2, value3

so this is like one to many mapping from every row in csv1 to all rows in csv2

1

1 Answers

0
votes

Let's imagine you have following files:

  1. 1.csv with the following contents:

    line 1 from 1.csv,2.csv
    line 2 from 1.csv,3.csv
    
  2. 2.csv with the following contents:

    line 1 from 2.csv
    line 2 from 2.csv
    
  3. 3.csv with the following contents:

    line 1 from 3.csv
    line 2 from 3.csv
    

You can achieve your requirement with the following JMeter Test Plan:

Altogether with demo:

JMeter Nested CSV