You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Sonam Chauhan <so...@ce.com.au> on 2005/08/29 09:39:27 UTC

RE: Reading data/Writing data to an external file, writing 'notes ' within JMeter?

Mark: 


> What I'm looking for is more of a 'configuration' file, to which it 
> would be easier for non-Jmeter users to modify some variables... 
> INI file with section/key names, .properties file, etc. i.e. a text 
> file with 'structure'...

I was faced with the same problem and solved it in two ways. First - you
mentioned property files - this is the simplest solution: JMeter can simply
read all properties from a file specified with the -p flag at runtime. i.e.:

	jmeter -p properties.cfg 
Property values can be accessed within JMeter by this construct: 
	${__P(my.special.property)}

The second I did to make it simpler for testing was organizing properties
into groups, which could take precedence over each groups based on runtime
parameters passed to a Perl meta-testengine. This dynamically rewrites the
property file at runtime and ran multiple JMeter instances... so the same
JMX script can run against different systems ('-s dev|test|uat|etc'), or
different load levels ('-l integration|load|stress|etc'), etc. 

Of course, the JMX scripts needed to be tightly parameterized to allow for
this.

There were many advantages I realized with this approach (including
integration and system testing, in addition to load testing -- since the
Perl engine can fork and run multiple JMeter processes). If you're
interested, I put together a presentation here: see Slides #10-14 in the
link that says: " webMethods Testing (472k)" on this page:
	http://www.wmusers.com/software/browse.shtml?keys=sonam

> 2) How can I *write* specific data to an external file?
Don't know much about this other than logs files and assertion data logging,
(which is probably too large-grained for your needs). Perhaps beanshell
could do the job? 


> 3) Is there any nice way to make 'notes' within JMeter? 
Not that I know, but there was some discussion on this on the list sometime
back. 

It would be good to have perhaps the ability for all tests to conform to an
external DTD. 

Regards,
Sonam


-----Original Message-----
From: 821MARK [mailto:821mark@gmail.com] 
Sent: Saturday, 27 August 2005 8:14 AM
To: jmeter-user@jakarta.apache.org
Subject: Reading data/Writing data to an external file, writing 'notes'
within JMeter?

I've picked up JMeter for some in-house web-based testing, with simple 
session IDs, tokens, etc... I'm using JMeter 2.1)
 I have 3 questions, hoping someone can answer them...
 1) How can I *read* from an external file?
- I've already read http://wiki.apache.org/jakarta-jmeter/JMeterFAQ , and 
that was very helpful. I am able to read a simple list in a text file.... 
What I'm looking for is more of a 'configuration' file, to which it would be

easier for non-Jmeter users to modify some variables... INI file with 
section/key names, .properties file, etc. i.e. a text file with 
'structure'...
 2) How can I *write* specific data to an external file?
- I'd like to use a RegEx post-processor, and rip out a 
transaction/confirmation ID from the HTML, and output it to a file... 
Example: I'd like a list that has: 123, 456,789,... Which is my list of 
transaction IDs... so that I can manually check them by hand later...
 3) Is there any nice way to make 'notes' within JMeter? I wasunable to add 
anything (using Right-Click) that resembled a 'Notes' object to the tree... 
I end up adding a User-Variables object, and just populating it... The 
problem with that one is I cannot modify the order of the list.
 Any help would be appreciated.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org