You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by 821MARK <82...@gmail.com> on 2005/08/27 00:13:30 UTC

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.

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

Posted by sebb <se...@gmail.com>.
Add a call to the logn function:

${__logn(Hello World,ERR)}
or
${__logn(Hello World,OUT)}

somewhere in the test element.

S.
On 26/09/05, 821MARK <82...@gmail.com> wrote:
> 1) How/what would you need to use to execute this log() function? i.e. from
> the JMeter manual, it says functions can be invoked within any Configuration
> Element, or Sampler element. How/what the heck do I do to log "Hello World"
> to std.err? to std.out?
>
> On 8/30/05, sebb <se...@gmail.com> wrote:
>   > 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...
>
> The __log[n]() function can write to jmeter.log, stdout or stderr.
>
> If you include a marker string within the text, it would be easy
> enough to extract this information from jmeter.log using grep, perl
> etc.
>
>

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


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

Posted by 821MARK <82...@gmail.com>.
1) How/what would you need to use to execute this log() function? i.e. from
the JMeter manual, it says functions can be invoked within any Configuration
Element, or Sampler element. How/what the heck do I do to log "Hello World"
to std.err? to std.out?

On 8/30/05, sebb <se...@gmail.com> wrote:
  > 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...

The __log[n]() function can write to jmeter.log, stdout or stderr.

If you include a marker string within the text, it would be easy
enough to extract this information from jmeter.log using grep, perl
etc.

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

Posted by sebb <se...@gmail.com>.
On 26/08/05, 821MARK <82...@gmail.com> wrote:
> 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'...

See Sonam Chauhan's reply.

>  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...

The __log[n]() function can write to jmeter.log, stdout or stderr.

If you include a marker string within the text, it would be easy
enough to extract this information from jmeter.log using grep, perl
etc.


>  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.

The Test Plan element has a comments section.

Otherwise you could probably use any sampler which has a large input
box (e.g. BeanShell) and use that - disable the test element before
running the test ...

> 
>

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