jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niraj <niraj.khatm...@gmail.com>
Subject Re: Passing variables between Thread groups
Date Wed, 15 May 2013 05:13:19 GMT
First of all you can not share variable amongst the thread groups. But you
can share the properties.So set your Variable as property using Beansheel.

Now next question is how to do this.

So if you extracting for an example SSN using Regex from the request
response in thread group 1 and you want to use that extracted SSN in thread
group 2. Then Add BeanShell Sampler under the request where you are
extracting SSN using reg ex. (ssn is reference name in Regx extractor)
Add this code in BeanShell ${__setProperty(ssn,${ssn})}.

In your second thread group copy this code ${__property(ssn)} where you
want to use the variable (which is declared as property).

Let me know if you have any question.


On Tue, May 14, 2013 at 10:04 PM, Deepak Shetty <shettyd@gmail.com> wrote:

> >in the test plan you can find a user defined variable, they are some
> >variable shared betwen all the thread.
> >you can define there the variables you need and give them the value you
> >need to communicate between your thread groups
>
> This is technically incorrect - changes are not shared - only the initial
> value is.
>
>
> On Tue, May 14, 2013 at 9:11 AM, tarik chichane <
> tarikchichane2006@gmail.com
> > wrote:
>
> > Hi,
> >
> > in the test plan you can find a user defined variable, they are some
> > variable shared betwen all the thread.
> > you can define there the variables you need and give them the value you
> > need to communicate between your thread groups
> >
> > Tarik CHICHANE
> > Ingénieur Telecom Réseaux
> > Administateur Réseaux Université
> > Hassan-II
> > Mohamadia
> >
> >
> > 2013/5/14 Muthukrishnan S. <muthukrishnan.s@sonata-software.com>
> >
> > > Hi All,
> > >
> > > I need to pass values of variables from one Thread group to other.
> Please
> > > let me know if there is a way other than using properties or
> Inter-Thread
> > > Communication from jmeter-plugins.
> > >
> > > Thank you,
> > > Muthu.
> > > Disclaimer: "The materials contained in this email and any attachments
> > may
> > > contain confidential or legally privileged information. The information
> > > contained in this communication is intended solely for the use of the
> > > individual or entity to whom it is addressed and others authorized to
> > > receive it. If you are not the intended recipient you are hereby
> notified
> > > that any disclosure, copying, distribution or taking any action in
> > reliance
> > > on the contents of this information is strictly prohibited and may be
> > > unlawful. If you have received this communication in error, please
> notify
> > > us immediately by responding to this email and then delete it from your
> > > system. Sonata is neither liable for the proper and complete
> transmission
> > > of the information contained in this communication nor for any delay in
> > its
> > > receipt"
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message