Purva Kawatra

CSV Data Config and Login Config in Jmeter

If you got to test a web application, the first action performed will be login operation. Jmeter which is a performance testing tool, helps to perform multiple login with different user names and password using CSV Data Config. There can be a situation when different users having different rights (say admin/normal user) has to login in the application. Therefore, the load on the landing page will differ as per the rights.

Perhaps, there can also be a possibility when user has to login with same user multiple number of times. Jmeter is helpful in that too.

Lets explore the what exactly is Jmeter and what is the difference and use of CSV and Login Data Config :-

Jmeter: Jmeter is basically an open source software which is completely Java based and designed to measure performance and load test functional behavior.

The Config elements in Jmeter such as CSV Config and Login Config are used as follows:

CSV Data Config Element:

Suppose a user wants to test a website with 20 users signing in application at the same time or you want to fill up the registration form for multiple users in the website.
Manually performing the task will be time consuming and requires lot of efforts,therefore parametrization the script to enter different details say for login or form can be maintained in the text file in the proper sequence, comma(,) separated that further has to be stored in bin folder in Jmeter.

How to open CSV Config in Jmeter is as follows:
CSV Config in Jmeter

CSV Config in Jmeter

Three values need to be filled on CSV Config screen:

  1. File name: If file is in the /bin directory, user just needs to enter file name. If it’s somewhere else, paste the complete file path.
  2. Variable names: This is the equivalent to a “column name” in a spreadsheet.
  3. Delimiter: Comma is the default delimiter, but if user’s file uses tabs this is the place to say so.

How to write data in text file is as follows:

How to write data in text file

How to run CSV config with HTTP request:

Steps for the same are as follows:
  1. Open Jmeter.
  2. Add CSV data con fig, HTTP Request, any listener for results under Thread Group.
  3. Run the script.Add CSV data con
  4. The data for multiple login i.e user name and password will be exported from File name (refer screen shot 3) .The File name will be provided in the CSV data config (refer screen shot 2).

Login Config Element:

The Login Config Element is used at the time of login. It adds or overrides the existing user name and password details and don’t let the simultaneous login’s at the same time.

How to open Login Config screen is as follows:

How to open Login Config screen

Login Config screen

Parameters:

  1. Name: Descriptive name of the element that has to be shown in the tree.
  2. User name: Any user name to be used.
  3. Password: Password for the user name provided.
CSV Data Config Login Config Element
It is used when multiple user login is required It is used when single user login is required.
Data is stored in .txt file and path is provided in the CSV config screen in Jmeter Data has to be entered in Login Config Screen in Jmeter
Multiple parameters like user name, password, cookie length etc can be stored comma separated in the .txt file . Only 2 parameters are used in Login config i.e user name and password.
 

Related Articles

#Tech

NHibernate, Linq and Lazy Collections

For the past few months we have been busy building a services framework for one of our clients so that they can build all of their enterprise web services without ever having to worry about the cross cutting concerns and... Read more
#Tech

Page Redirects using Spring.NET

Who is responsible for page redirects in ASPNET MVP – The View or the Presenter None of the above, it is you :) On a serious note, it is the View as one shouldn’t pollute the Presenter with the page navigation... Read more
  • Aneal Maharjan

    I have to test a node.js application that deals with online live auctions. i need to concurrently give load of say, 200 users ,now do I need to insert all those 200 users in csv file?
    And also I’d like to know In thread properties what should be the value for : No. of threads(users),ramp up period and loop count. I am new to apache jMeter tool. I am going to use websocket sampler. Are users and threads same thing?