Monday, January 7, 2019

How to pass variable data in JMETER request

How to use CSV data set config in Jmeter for passing varible data in JSON request 

To create real-time scenario we need to pass variable data in request. For this we can use “CSV data set config”. Right click on Thread group > Add> Config Element> CSV Data Set Config



You will see CSV data set config like this 



Now we need to create a CSV from which JMETER variable will pick up value and append in Request.  Create CSV and enter data for variable, Here I am passing address line as variable. ( You can open CSV in notepad ). After each address press TAB and then next line new address  , So JMETER can understand multiple variables 


Update configuration  in “CSV data config set”


Filename:- Complete path where file is stored 
Variable Name:- You can give any name to variable 
Ignore First line:- If you specified Name of variable in data sheet at first line then Make it True else False ( I made false) 
Delimiter: -  We used TAB so will use \t for tab 
Allow Quoted data:- If test data is in quotes then make it true JEMTER will omit quotes and will use data inside quotes (Recommended to keep True always) 
Recycle on EOF: - True, It will recycle used data once reaches to end of file 
Stop Thread on EOF:- False , as we want to recycle data 
Sharing mode: - All threads  

Once CSV data set configuration done we need to replace actual address line with variable name ${addressLine} 


Now run test for 5 users, and check result all 5 users sent different address line in request  




Related Posts:

  • API performance testing using JMETER  API performance testing using JMETER In this article we are going to learn about How to use step by step JMETER for API Load and Performance testing . Basic information and details about JMETER and what is web… Read More
  • How to pass variable data in JMETER request How to pass variable data in JMETER request How to use CSV data set config in Jmeter for passing varible data in JSON request  To create real-time scenario we need to pass variable data in request. For this we can… Read More
  • Understanding JMETER Listeners Understanding Listeners in JEMTER  :-  Listener displays particulars of sampler requests and responses, and can display basic HTML and XML representations of the response. Other listeners deliver summary or a… Read More
  • JMETER -Understanding Thread Group In this part of step by step JMETER tutorial we are going to learn about JMETER element “THREAD GROUP” What is Thread Group in JMETER:- Thread group is a place where we actually put number of users (Thread… Read More
  • Creating Test Plan in JMETER Creating Test Plan in JMETER How to create test plan in JMETER for REST API performance testing? For REST API performance testing we have to start with Test plan in JMETER. The test Plan is where the overall settings… Read More

0 comments:

Post a Comment

Popular Posts