JMeter calling variables across thread groups

Source: Internet
Author: User
Because there are special requirements that require variables to be called between thread groups, here are a few common ways to summarize (just personal). When using, pay attention to the execution order of thread groups, and you need to tick the separate run each thread group button in the test plan. It is also important to note that the post processor that sets the global variable should be in the first thread group (that is, the thread group that extracts the local variables). the BeanShell method props.put ("Variable name", "value") global variable Assignment props.get ("variable name") gets the global variable two, JMeter comes with the function __setproperty${__setproperty ( Variable name, value} global variable assignment ${__property (variable name)} global variable fetch ${__p (variable name)} equals ${__property (variable name)} III, calling the method Jmeterutils.setproperty in the jar package ("Variable name", "Value") global variable assignment four, using the JMeter plug-in with two pre-and post-processor plug-ins, you can make the upper and lower two thread groups pass a variable. The corresponding variable value is placed in the FIFO queue by the Post processor, then the next thread group is added to the predecessor processor, and the value of the variable is re-assigned to the other variable name from the queue.

Finally, you can see whether the global variable is set successfully by adding a property display component to the workbench, or you can use Debugsampler to view it directly. It's all possible.

JMeter calling variables across thread groups

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.