You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Ryan Miling <rm...@bzzagent.com> on 2008/08/12 15:59:02 UTC

Beanshell Listener

Hi everyone, I need to create a test plan that will go through HTTP
requests, extract vars, and write them to a CSV file (one line per
iteration of the loop). Here is a brief skeleton:


...
While Controller
   HTTP Request
      Regular Expression Extractor (extracts to var name 'var1')
   HTTP Request
      Regular Expression Extractor (extracts to var name 'var2')
   HTTP Request
      Regular Expression Extractor (extracts to var name 'var3')
   BeanShell Listener (?)
...

Is the BeanShell Listener the best way to go? If so what would the
script be to include? Any help or pointers in the right direction would
be most appreciated...thanks!

-Ryan


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


Re: Beanshell Listener

Posted by sebb <se...@gmail.com>.
On 12/08/2008, Ryan Miling <rm...@bzzagent.com> wrote:
> Hi everyone, I need to create a test plan that will go through HTTP
>  requests, extract vars, and write them to a CSV file (one line per
>  iteration of the loop). Here is a brief skeleton:
>
>
>  ...
>  While Controller
>    HTTP Request
>       Regular Expression Extractor (extracts to var name 'var1')
>    HTTP Request
>       Regular Expression Extractor (extracts to var name 'var2')
>    HTTP Request
>       Regular Expression Extractor (extracts to var name 'var3')
>    BeanShell Listener (?)
>  ...
>
>  Is the BeanShell Listener the best way to go? If so what would the
>  script be to include? Any help or pointers in the right direction would
>  be most appreciated...thanks!
>

The latest version of JMeter (2.3.2) allows one to define a list of
variables to be written to the log file:

http://jakarta.apache.org/jmeter/usermanual/listeners.html#sample_variables

In your case, define the property:

sample_variables=var1,var2,var3

Or use a single same variable name, and use the URL (or label) of the
sample to determine what the contents represent.

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

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