Site icon Vinsguru

JMeter – Property File Reader – A custom config element

JMeter has many config elements to define some variables  which can be used in the JMeter test.

For example – the mostly used ones,

But we do not have one to read a user property files!!  hm..Well..that is not true exactly!!

In the JMETER_HOME/bin folder, we have a jmeter.properties file which has JMeter specific properties to set logging configuration, HTTPClient configuration, remote host configuration etc.

The same file also has a property called user.properties in which we can mention our file path to be read to use it in JMeter. So, JMeter can actually read the user property files. Then what?  But – I do not want to touch JMETER_HOME/bin folder to read my property files every time.

Reading a user property files can also be done using Beanshell pre processors/Samplers in JMeter. However, as JMeter is open source, I wanted to create a custom config element to read the property files.   This link has the details to create a plugin for JMeter.

 

Property File Reader  – Config Element:


	tag-jmeter-extn-1.1.zip	(320067 downloads)


I maintain no of users, ramp up period, test duration, application URL & many other information for my test in the property file. So I wanted to create a simple config element to read property file instead of using a Beanshell preprocessor to make a test neat & reusable.

 

 

Happy Testing & Subscribe 🙂

 

 

Share This:

Exit mobile version