This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Testing and the fly likes JMETER problems with user parameter option Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "JMETER problems with user parameter option" Watch "JMETER problems with user parameter option" New topic
Author

JMETER problems with user parameter option

vijaya sharma
Greenhorn

Joined: Dec 30, 2003
Posts: 15
Hi all,
I have installed the jmeter and done the recording,which recorded the steps that i want jmeter to repeate and load test my database,i used the user parameter option to set multiple user with different values but there is also a alternative to it by specifying the file name conatining the list of values instead of entering the names individually in the user parameter option.
all works fine but user parameter option doens't work with the filename,it works fine when i individually specify each user
I am having great problem as i want to test database with 1000 of different values.
please Help,
Thanx to you all in advance,
VS


only thing constant is change
Steve Grant
Ranch Hand

Joined: Nov 24, 2003
Posts: 106
Dear Vijay,
I am also having same requirement but as per my knowledge Jmeter reads the only first value from a file . I think this is a bug in Jmeter which u can see it from Bug report section of Apache of Jmeter.
rgds,
siddharth


SCJP1.4<br />IBM Certified System Administrator -- WebSphere Application Server V5.0 (340)
Steve Grant
Ranch Hand

Joined: Nov 24, 2003
Posts: 106
Dear Vij,
Try out this link http://weblogs.java.net/pub/wlg/737.
rgds,
siddharth
bala nagaraj
Greenhorn

Joined: Jan 06, 2004
Posts: 2
Vijay -
I had the same problem, try the options --> function helper dialog to generate your files parameter reading at the end of the record don't forget to call the 'next' below is an example of reading generated script to paste for reading a CSV file having 2 values / line.

${__CSVRead(C:\\userinfo.csv,0)}
${__CSVRead(C:\\userinfo.csv,1)}
${__CSVRead(C:\\userinfo.csv,next)}
Steve Grant
Ranch Hand

Joined: Nov 24, 2003
Posts: 106
Dear All,
I have some good idea for generating dynamic parameter in Jmeter. Download latest Jmeter and there is a users.xml or server.xml (just check with the filename. i dont remember it right now ) file in jmeter bin directory . now this file contains the user parameter options where you can add different values for same parameter . I would suggest to write a File io java program for this ,if the number of users are more . Now start Jmeter and select your test case , then right click and add User Parameter. After that add the Http request default and add the parameter in this console but dont provide any value for it. That's it run the test case. I hope this helps....

Rgds ,
Siddharth K
Priya Soparkar
Greenhorn

Joined: Apr 28, 2004
Posts: 4
Hi,
I have been using __CSVRead(..) to read the user defined parameters from a data file for JMeter.
My requirements is such that i have more number of records in file than the number of threads and i want to use diff data for each iteration of the thread.
e.g In my data file i have 1000 records and JMeter has 100 threads running 5 times.
Typically when u read external data file using __CSVRead , it reads first 100 records. In next iteration file pointer is again moved to BOF .
So in eahc iteration threads use the same data.
What my requirement is, in the first iteration first 100 records should be read .
In second iteration the threads should use data from 101 records onwards and so on till all the samples are spawned.
If anyone has pointers on this, pl inform.
Thanks,
Priya
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JMETER problems with user parameter option
 
Similar Threads
Junit and Jmeter testing issue
How to save value from ResultSet as a single value in database
JMeter: Need help Urgently
Storing multiple values in the Database.
Storing multiple values in the Database.