You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by na...@wipro.com on 2013/04/18 08:28:08 UTC

reusing the extracted dynamic variables in jmeter

Hi,

I am correlating few variables in the thread groups. How do I use these same variables in another thread group?

I want these correlated variables to be accessed by multiple thread groups i.e these variables should be common to the entire test plan, not just specific to a thread group.

How do I achieve this?

____________________________________________________________________________________
Regards,
Namrata


Please do not print this email unless it is absolutely necessary. 

The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. 

WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. 

www.wipro.com

Re: reusing the extracted dynamic variables in jmeter

Posted by Niraj <ni...@gmail.com>.
Hey Namrata,

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.

Thanks,
Niraj





On Thu, Apr 18, 2013 at 11:58 AM, <na...@wipro.com> wrote:

> Hi,
>
> I am correlating few variables in the thread groups. How do I use these
> same variables in another thread group?
>
> I want these correlated variables to be accessed by multiple thread groups
> i.e these variables should be common to the entire test plan, not just
> specific to a thread group.
>
> How do I achieve this?
>
>
> ____________________________________________________________________________________
> Regards,
> Namrata
>
>
> Please do not print this email unless it is absolutely necessary.
>
> The information contained in this electronic message and any attachments
> to this message are intended for the exclusive use of the addressee(s) and
> may contain proprietary, confidential or privileged information. If you are
> not the intended recipient, you should not disseminate, distribute or copy
> this e-mail. Please notify the sender immediately and destroy all copies of
> this message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient
> should check this email and any attachments for the presence of viruses.
> The company accepts no liability for any damage caused by any virus
> transmitted by this email.
>
> www.wipro.com
>

Re: reusing the extracted dynamic variables in jmeter

Posted by Deepak Shetty <sh...@gmail.com>.
out of the box , no - Jmeter sharing out of the box between threads is
Properties and BeanShell shared namespace
You also have a plugin --
http://code.google.com/p/jmeter-plugins/wiki/InterThreadCommunication
and you can write your own -- for e.g
http://theworkaholic.blogspot.com/2013/03/sharing-session-ids-across-threads.html

But you should also see whether you can structure your test plan to not
need this.


On Wed, Apr 17, 2013 at 11:28 PM, <na...@wipro.com> wrote:

> Hi,
>
> I am correlating few variables in the thread groups. How do I use these
> same variables in another thread group?
>
> I want these correlated variables to be accessed by multiple thread groups
> i.e these variables should be common to the entire test plan, not just
> specific to a thread group.
>
> How do I achieve this?
>
>
> ____________________________________________________________________________________
> Regards,
> Namrata
>
>
> Please do not print this email unless it is absolutely necessary.
>
> The information contained in this electronic message and any attachments
> to this message are intended for the exclusive use of the addressee(s) and
> may contain proprietary, confidential or privileged information. If you are
> not the intended recipient, you should not disseminate, distribute or copy
> this e-mail. Please notify the sender immediately and destroy all copies of
> this message and any attachments.
>
> WARNING: Computer viruses can be transmitted via email. The recipient
> should check this email and any attachments for the presence of viruses.
> The company accepts no liability for any damage caused by any virus
> transmitted by this email.
>
> www.wipro.com
>