Easwar
Easwar

Reputation: 33

Receiving Error While passing Dynamic Values From CSV in JMETER

Please check the below steps I followed in my test.

  1. First, created a CSV file with the username and password. I have done this in a text editor, and saved as .CSV file. My CSV Looks Like:

    username password user 1 pwd 1 user 2 pwd 2

  2. And I placed in the Specific path and I have mentioned in the same path in CSV Data Set Configuration steps.

    File Name : mentioned full path of the file. Variable names : username,password Delimiter : ,

  3. Next I Have defined the below changes in HTTP Request

    username with ${username} password with ${password}

  4. After running the test, the passed user logins are not taking from the script and the test got failed.

please guide me if some where am wrong.

Upvotes: 0

Views: 987

Answers (2)

Konstantin Dobroliubov
Konstantin Dobroliubov

Reputation: 669

Here's how your input file and Jmeter item should look like:

CSV config

Upvotes: 1

Dmitri T
Dmitri T

Reputation: 168082

  1. If your CSV file is actually separated by tabulation symbols you need to change the delimiter to \t
  2. I would suggest removing leading "username" and "password" from your CSV file, JMeter won't recognise header so you'll have at least one failed request.

Other bits look good.

You may also want to check out Using CSV DATA SET CONFIG guide and __CSVRead() function.

Upvotes: 0

Related Questions