You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Ori Marco <or...@praxell.com> on 2008/01/24 10:55:18 UTC

setproperty help

Hi

 

I failed to use setproperty option. I need to make local variable (e.g.
timex) as global variable(e.g. StartDateDB).

 

I use the command in user parameters as ${__setProperty(StartDateDB,'${
timex }')} or ${__setProperty(StartDateDB,${timex})}

or ${__setProperty(StartDateDB,timex)}

 

but it didn't work and without errors in log.

 

How should I use this function?

 

Thanks

 

Ori Marko 
Quality Assurance Engineer 
Praxell Inc.
http://www.praxell.com <http://www.praxell.com> 


Re: setproperty help

Posted by sebb <se...@gmail.com>.
On 24/01/2008, Ori Marco <or...@praxell.com> wrote:
> Found it , should use __P to get variable and can't reference to new
> global variable as ${ StartDateDB }
>
> Why can't global varaiables be address as ${var}?
>

There are no global variables.

There are JMeter thread variables, which are accessed as:

${varname}

and there are global properties, which are accessed as:

${__P(propname)}

or

${__property(propname)}

>
> Ori Marko
> Quality Assurance Engineer
> Praxell Inc.
> http://www.praxell.com
> -----Original Message-----
> From: Ori Marco [mailto:orim@praxell.com]
> Sent: Thursday, January 24, 2008 11:55 AM
> To: jmeter-user@jakarta.apache.org
> Subject: setproperty help
>
> Hi
>
>
>
> I failed to use setproperty option. I need to make local variable (e.g.
> timex) as global variable(e.g. StartDateDB).
>
>
>
> I use the command in user parameters as ${__setProperty(StartDateDB,'${

That will set the property StartDateDB to the string '${timex }' (with
the quotes)

> timex }')} or ${__setProperty(StartDateDB,${timex})}
>

That will set the property StartDateDB to the value of the variable timex

which is what you wanted.

> or ${__setProperty(StartDateDB,timex)}
>

That will set the property StartDateDB to the string 'timex' (without quotes)

>
> but it didn't work and without errors in log.
>
>
>
> How should I use this function?
>
>
>
> Thanks
>
>
>
> Ori Marko
> Quality Assurance Engineer
> Praxell Inc.
> http://www.praxell.com <http://www.praxell.com>
>
>
> ---------------------------------------------------------------------
> 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: setproperty help

Posted by Ori Marco <or...@praxell.com>.
Found it , should use __P to get variable and can't reference to new
global variable as ${ StartDateDB }

Why can't global varaiables be address as ${var}?


Ori Marko 
Quality Assurance Engineer 
Praxell Inc.
http://www.praxell.com
-----Original Message-----
From: Ori Marco [mailto:orim@praxell.com] 
Sent: Thursday, January 24, 2008 11:55 AM
To: jmeter-user@jakarta.apache.org
Subject: setproperty help

Hi

 

I failed to use setproperty option. I need to make local variable (e.g.
timex) as global variable(e.g. StartDateDB).

 

I use the command in user parameters as ${__setProperty(StartDateDB,'${
timex }')} or ${__setProperty(StartDateDB,${timex})}

or ${__setProperty(StartDateDB,timex)}

 

but it didn't work and without errors in log.

 

How should I use this function?

 

Thanks

 

Ori Marko 
Quality Assurance Engineer 
Praxell Inc.
http://www.praxell.com <http://www.praxell.com> 


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org