On 22/10/2008, Jose Castro <[EMAIL PROTECTED]> wrote:
> I have the following
>
> jdbc
> ---->regex(refname:soc_req_no_rx,reg expression: (.*),
> template:$1$,match:-1, default value:0)
>
> when that is done I access the data that I want like ${soc_seq_no_rx_2}
OK.
> Since I dont like that I want to have a variable in my users
What do you mean - you don't like that?
> parameters and just do
>
> jdbc
> ----->regex
> ----->beanshell post proceess
> my_user_var = ${soc_seq_no_rx_2}
>
> But that does not work, When I logn the variable my_user_var , I always get 0
>
> What is the correct way to asssign variables?
>
What variables are you talking about?
If you are referring to setting a BeanShell variable from a JMeter
variable then you need to use:
my_user_var = vars.get("soc_seq_no_rx_2")
The assignment:
my_user_var = ${soc_seq_no_rx_2}
will only work if soc_seq_no_rx_2 is numeric. If it is text, BeanShell
will see something like
my_user_var = here is the extracted text
which is not valid.
Remember that variable (and function) references are evaluated before
BeanShell sees the script.
>
> Thank you
>
> ---------------------------------------------------------------------
> 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]