Thursday 14 August 2014

JMeter login script with csv file parametrize

JMeter login script with csv file parametrize

Step:-

1.Open Jmeter

2.Add a Thread Group : Select test plan

Add-Threads(Users)-Thread Group create thread grup

3.Add CSV Data Set Cnfig

right click on Thread Grup- Add-Config element-CSV Data Set Config

  Type Filename- E:\login.txt
  Variable Names (comma-delimitied)-Loginname,password
  Delimiter (use "\t" for tab)- ,

4.Add HTTP request

  Add-Samplear-HTTP Request
  ServerName or IP- localhost
  Port Number-8080
  Path-/C3DNA/saveLogin.html
  Parameters  values
  Username    ${Loginname}
  Password    ${password}
  Protocol[http]-http
  Method-POST

5.Add View Results Tree

 Thread group-Add-Listener-View Results Tree

6.Run  this , you can get the result on view result tree

E:\login.txt

username,password
xxxxxxx,yyyyyyyy
zzzzzzzz,dddddddd

No comments:

Post a Comment