jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: Can we run a BeanShell PP only once in a thread
Date Tue, 31 Jan 2012 00:53:13 GMT
On 31 January 2012 00:44, Nirodha Pramod <nirodha@wso2.com> wrote:
> Hi,
>
> I have a requirement to read a jmeter property and extract some values out
> of that. To explain more my property is 'csv.variables' = "var1,var2,var3"
> (which has a string of comma separated values). So what I want to do is
> read the property value and separate the var1,var2....... values out of
> that string, inside a beanshell pp and use them as variable names in
> jmeter. So is there a way that I can execute the Bshell only once to read
> those values. Other wise executing that java code in each thread will give
> a performance hit. Does anyone have any idea on how do it in a better way.

Yes; any one of:

Use a setUp thread group
Use a once-only controller
Use a beanshell function to do it on the Test Plan

Of course if you allow the use of something other than BeanShell:

Use the __split function to do it on the Test Plan
Use CSV Dataset Config to read the data from a file instead

Not forgetting: provide the property ready-split

> Thanks,
> Nirodha
>
>
>
> --
> *Nirodha Gallage*
> Software Engineer, QA.
> WSO2 Inc.: http://wso2.com/
> Email: nirodha@wso2.com   Mobile: +94716429078

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


Mime
View raw message