3
votes

I am wanting to achieve the following in JMETER

  1. Jmeter loads CSV file with id numbers
  2. Each user/thread in Jmeter picks a id number and adds it to their HTTP request e.g. http:www.testsite.com/test.php?id=x
  3. Repeat step 2 , selecting the next id number in the file.

This is so I can test that my servlet is performing multiple threads with connection pooling.

I have tried manually entering in values hereenter image description here

However this is not working.

Schema Layout:

enter image description here

Thanks

1

1 Answers

8
votes

You can try to implement your schema as below:

1. Prepare your test-IDs in csv-file, e.g. in the following format:

id1
id2
...
idN

2. Use the following schema:

CSV Data Set Config
Filename: [path to your csv-file with test-IDs]
Variable Names: testID  // extracted id can be referred as ${testID}
Recycle on EOF? False
Stop thread on EOF? True
Sharing mode: Current thread // this mode allows EACH thread use ALL values from csv
Thread Group
Number of Threads: N    // count of your test-threads (users)
Loop Count: Forever
. . .
    HTTP Request // your http call
    Server Name or IP: www.testsite.com
    Path: /test.php?id=${testID} // use variable with extracted ID
. . .