You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Abram Catalano <ab...@adaptx.com> on 2008/02/28 05:20:25 UTC
how to set Properties in BeanShell?
I want to add a property via BeanShell, how?
I tried:
import org.apache.jmeter.util.JMeterUtils;
String var = "baz";
JMeterUtils.setProperty("foo", var);
which seems to result in:
2008/02/27 20:07:11 WARN - jmeter.extractor.BeanShellPostProcessor:
Problem in BeanShell script org.apache.jorphan.util.JMeterException:
Error invoking bsh method: eval Sourced file: inline evaluation
of: ``import org.apache.jorphan.collections.*; import
java.sql.Timestamp; import java. . . . '' : Method Invocation
JMeterUtils.setProperty
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: how to set Properties in BeanShell?
Posted by sebb <se...@gmail.com>.
Also vars.put("foo","baz")
See *.bshrc examples in bin directory.
On 28/02/2008, Abram Catalano <ab...@adaptx.com> wrote:
> Nevermind, the code below worked.
>
>
>
> Abram Catalano wrote:
> > I want to add a property via BeanShell, how?
> >
> > I tried:
> >
> > import org.apache.jmeter.util.JMeterUtils;
> > String var = "baz";
> > JMeterUtils.setProperty("foo", var);
> >
> > which seems to result in:
> > 2008/02/27 20:07:11 WARN - jmeter.extractor.BeanShellPostProcessor:
> > Problem in BeanShell script org.apache.jorphan.util.JMeterException:
> > Error invoking bsh method: eval Sourced file: inline evaluation
> > of: ``import org.apache.jorphan.collections.*; import
> > java.sql.Timestamp; import java. . . . '' : Method Invocation
> > JMeterUtils.setProperty
> >
> > ---------------------------------------------------------------------
> > 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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: how to set Properties in BeanShell?
Posted by Abram Catalano <ab...@adaptx.com>.
Nevermind, the code below worked.
Abram Catalano wrote:
> I want to add a property via BeanShell, how?
>
> I tried:
>
> import org.apache.jmeter.util.JMeterUtils;
> String var = "baz";
> JMeterUtils.setProperty("foo", var);
>
> which seems to result in:
> 2008/02/27 20:07:11 WARN - jmeter.extractor.BeanShellPostProcessor:
> Problem in BeanShell script org.apache.jorphan.util.JMeterException:
> Error invoking bsh method: eval Sourced file: inline evaluation
> of: ``import org.apache.jorphan.collections.*; import
> java.sql.Timestamp; import java. . . . '' : Method Invocation
> JMeterUtils.setProperty
>
> ---------------------------------------------------------------------
> 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