You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Raffaele Viola <ra...@gmail.com> on 2006/05/09 12:09:05 UTC

golbal variable

Hi all

Where and how can I create a global variable that every thread can modify?

thanks
Raffo

Re: golbal variable

Posted by Raffaele Viola <ra...@gmail.com>.
Normally JMeter threads represent independent users - so surely you
need a variable that is local to the thread, not a global variable?

I need a variable that all the threads can see and modify because I must now
if a thread goes wrong to make the other thread finish their activity

In which case, the variable already exists:

JMeterThread.last_sample_ok

This will be "true" or "false"; you can use it in an If Controller
containing the logout sampler.

I don't understand what do you mean


thanks _Raffo

Re: golbal variable

Posted by sebb <se...@gmail.com>.
Normally JMeter threads represent independent users - so surely you
need a variable that is local to the thread, not a global variable?

In which case, the variable already exists:

JMeterThread.last_sample_ok

This will be "true" or "false"; you can use it in an If Controller
containing the logout sampler.

S
On 09/05/06, Raffaele Viola <ra...@gmail.com> wrote:
> I have to make a test plan where every thread open a transaction with the DB
> and if all goes fine send a commit, in case of error  send  a rollback
> command.
> The problem is:  in case of error all the thread must send a rollback
> commnad
>
> _Raffo
>
> On 5/9/06, sebb <se...@gmail.com> wrote:
> >
> > You'll have to use a property - have a look at the property functions.
> >
> > But why do you need to do this?
> >
> > S
> > On 09/05/06, Raffaele Viola <ra...@gmail.com> wrote:
> > > Hi all
> > >
> > > Where and how can I create a global variable that every thread can
> > modify?
> > >
> > > thanks
> > > Raffo
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > 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: golbal variable

Posted by Raffaele Viola <ra...@gmail.com>.
I have to make a test plan where every thread open a transaction with the DB
and if all goes fine send a commit, in case of error  send  a rollback
command.
The problem is:  in case of error all the thread must send a rollback
commnad

_Raffo

On 5/9/06, sebb <se...@gmail.com> wrote:
>
> You'll have to use a property - have a look at the property functions.
>
> But why do you need to do this?
>
> S
> On 09/05/06, Raffaele Viola <ra...@gmail.com> wrote:
> > Hi all
> >
> > Where and how can I create a global variable that every thread can
> modify?
> >
> > thanks
> > Raffo
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: golbal variable

Posted by sebb <se...@gmail.com>.
You'll have to use a property - have a look at the property functions.

But why do you need to do this?

S
On 09/05/06, Raffaele Viola <ra...@gmail.com> wrote:
> Hi all
>
> Where and how can I create a global variable that every thread can modify?
>
> thanks
> Raffo
>
>

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