A J
A J

Reputation: 1545

JMeter - testing unique links taken from CSV file

I want to test unique link taken from csv file in Jmeter. I have a csv file with unique values - "value 1", "value 2" ..... For each thread, I need to append it as part of url(or path).

Ex: BaseURL: example.com
For thread 1, example.com/value1 
For thread2, example.com/value2

How can I do this in JMeter? Any help will be highly appreciated. I have created CSV and all. Just need to know how to take that value and set as part of path.

Upvotes: 0

Views: 1270

Answers (2)

Dmitri T
Dmitri T

Reputation: 168002

  1. Put your "base url" into "Server name or IP" tab of the HTTP Request Defaults:

    enter image description here

  2. Configure CSV Data Set Config to read the values from the file and store them into a JMeter Variable

    enter image description here

  3. Use the variable from the step 2 in "Path" field of the HTTP Request sampler:

    enter image description here

That should be it, each thread will read the next value from the CSV file on each iteration:

Demo:

enter image description here

Upvotes: 1

Ori Marko
Ori Marko

Reputation: 58774

In CSV Data Set Config add path as Variables Names, use Sharing mode All Threads

In HTTP Request Path field add ${path}

Each thread will send a different path taken from CSV line

Upvotes: 0

Related Questions