works like a charm. Jmeter restart did the trick.
Thanks for responses sebb

Thanks
Tarun K

On 2 March 2016 at 11:17, Bhadauria, Tarun Kumar <
tarun.kumar.bhadau...@zalando.de> wrote:

> I converted the variable into property using User Parameters and test runs
> good but yet the variable value is not printed in jtl log. There is always
> null value printed for sample where variable is used. Test Plan looks as -
>
> http://i.stack.imgur.com/uw1Zn.png
>
> And I added following line to run script -
>
> -Jsample_variables=verifytoken \
>
> But verifytoken is always null for sample - getTokenInfo Did I miss any
> configuration?
>
> Thanks
> Tarun K
>
> On 1 March 2016 at 18:19, sebb <seb...@gmail.com> wrote:
>
>> On 1 March 2016 at 16:28, Bhadauria, Tarun Kumar
>> <tarun.kumar.bhadau...@zalando.de> wrote:
>> > I am concerned of using overhead of using java sampler.
>>
>> The Java sampler is one of the least expensive samplers.
>> You could put it in a setup group.
>>
>> > Property is one of the way using which variables can be shared among
>> > multiple threads groups.
>>
>> > I would probably end up storing property in another variable using
>> > Beanshell preprocessor and have it posted on jtl file.
>>
>> Beanshell is a lot more expensive than the Java sampler.
>>
>> If the property is not changed during the test run you can copy it to
>> a variable on the Test Plan using the _P() function.
>>
>> If it does change during a run then you can use the User Parameters
>> pre-processor in conjunction with the _P() function.
>> That will be cheaper than BeanShell (or any other scripting for that
>> matter).
>>
>> > Thanks
>> > Tarun K
>> >
>> > On 1 March 2016 at 17:02, sebb <seb...@gmail.com> wrote:
>> >
>> >> On 1 March 2016 at 15:48, Bhadauria, Tarun Kumar
>> >> <tarun.kumar.bhadau...@zalando.de> wrote:
>> >> > Hello All,
>> >> >
>> >> > I have been using "sample_variables" to print custom variables in jtl
>> >> file.
>> >> > I would also like to print custom parameter using this approach.
>> >> > But specifying property as -
>> >> >
>> >> > -Jsample_variables=prop1,prop1
>> >> >
>> >> > does not log corresponding value in jtl file. And I see only null
>> values
>> >> in
>> >> > log file.
>> >> > Is there a way to log properties in jtl file
>> >>
>> >> There is no inbuilt support for automatically logging property values,
>> >> and this is unlikely to be added.
>> >> Properties are global, so don't apply to individual samples or even to
>> >> threads.
>> >>
>> >> You can use a Java sampler or similar to store anything you want in the
>> >> JTL file
>> >>
>> >> >
>> >> >
>> >> > Thanks
>> >> > Tarun K
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
>> >> For additional commands, e-mail: user-h...@jmeter.apache.org
>> >>
>> >>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
>> For additional commands, e-mail: user-h...@jmeter.apache.org
>>
>>
>

Reply via email to