jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <>
Subject Re: New to jmeter.. simple question "Way to easily read property in AbstractJavaSamplerClient implementation?"
Date Fri, 18 Sep 2009 22:06:24 GMT
On 18/09/2009, Rick <> wrote:
> I'm writing several AbstractJavaSamplerClient implementations to do some
>  remote EJB testing. I'd like to pass in a property on jmeter start up like:
>  ./jmeter

This defines a JMeter property.

>  Is there an easy way to access this property from my Sampler implementation?
>  I thought I'd be able to get a handle to it with
>  public SampleResult runTest(JavaSamplerContext context) {
>   String provider_url = context.getParameter("provider_url", "");

Here is the Javadoc:
"JavaSamplerContext is used to provide context information to a
JavaSamplerClient implementation. This currently consists of the
initialization parameters which were specified in the GUI. Additional
data may be accessible through JavaSamplerContext in the future."

i.e. not the same as a JMeter property.

>  But the above doesn't work (always null.)

>  Any help appreciated.


>  --
>  Rick R

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message