evalVar is not suitable:
Caused by: groovy.lang.MissingPropertyException: No such property: println for 
class: Script10




At 2016-08-16 02:55:43, "Deepak Shetty" <[email protected]> wrote:
>vars is not available to __eval function as far as I know . The
>documentation calls out places where vars is available
>http://jmeter.apache.org/usermanual/functions.html
>
>Also for your usecase , probably evalVar is more suitable ?
>http://jmeter.apache.org/usermanual/functions.html#__evalVar
>
>On Mon, Aug 15, 2016 at 7:48 AM, harry_no_spot <[email protected]> wrote:
>
>> Still not understand why
>> println ${__eval(vars.get("var"))}
>> will print
>>
>> ${__time(yyyyMMdd)}
>> instead of
>> 20160815
>>
>>
>>
>> At 2016-08-15 22:32:11, "harry_no_spot" <[email protected]> wrote:
>> >I answer myself.
>> >use println  ${__eval(${var})}  will be ok
>> >use println ${__eval(vars.get("var"))} will be not ok.
>> >
>> >
>> >At 2016-08-11 21:32:01, "harry_no_spot" <[email protected]> wrote:
>> >>hi, plz help me, the question is:
>> >>1. senario as expected:
>> >>a.create a csv file, contents is
>> >>var
>> >>123
>> >>b.very simple test plan. 'CSV data set config' & 'JSR223 Sampler'
>> >>c. println ${__eval(vars.get("var"))}
>> >>it prints 123 on console as expected.
>> >>
>> >>2. senario not as expected
>> >>a. change csv file, content is
>> >>var
>> >>${__time(yyyyMMdd)}
>> >>b. it prints ${__time(yyyyMMdd)} on console, not as expected, say,
>> 20160811
>> >>
>> >>so why?
>> >>
>>

Reply via email to