JMeter variable transfer between different thread groups

Source: Internet
Author: User

JMeter elements are scoped, and variables mostly use regular expression extractors, and to use variable arguments without threading components, you need to set all variables

The JMeter function Helper provides a function to set global variable properties, which is similar to the variables added in user-defined variables.

__setproperty: Used to dynamically set the JMeter property

Return Original Value of property (default false)? : Returns the function result, defaults to No, and returns if filled in true

For example, the regular expression extracts the value of a variable

Setting global variables with BeanShell postprocessor

It means to set the obtained variable ${old_variable} to a global variable and reference it with the new name New_variable

Use the _p function in thread Group 2 to invoke the JMeter property, get the property value, and implement cross-thread group, parameter value passing.

Note: ${__p (new_variable,)} There is a comma behind it. Do not forget that the variable is quoted successfully.

JMeter variable transfer between different 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.