Hi Josh,

Thanks for the very quick answer.

it's working !!

thank you very much !

Raj



Joshua Auerbach a écrit :

User defined variables must be static...just use the Beanshell function where you are currently using the ${TODAY} variable

-Josh


[EMAIL PROTECTED] wrote:

Hi all,

i have to work with dates so i thought i could use beanshell so that i can use java with makes it very easy to handle date formats. i've read some previous posts about dates but i must be missing something as i can't make it work.
here's what i've done :
i've downloaded the bsh-2.0b4.jar and put it in jmeter/lib.
i've create a user defined variable called TODAY
with the value
${__BeanShell(java.util.GregorianCalendar calendar = new java.util.GregorianCalendar();Date date = calendar.getTime();new java.text.SimpleDateFormat("dd/MM/yyyy HH:mm:ss").format(date))}
and i try to use ${TODAY} as a parameter value in my request.
when a use a view tree result to see the request, i see that the code is written as it is
(${__BeanShel......)
and is not evaluated.
i've also tried using the javascript function __javascript i get the same thing in the request : the value of my user defined variable is written instead of its value.

any ideas ?

Thanks in advance,
raj




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to