sree raja
sree raja

Reputation: 177

How to use a variable between two thread groups

I have two thread groups

  1. Creation of customer

  2. Creation of account

From first thread group I'm capturing a variable called customerId.

How can I use that variable in second thread group?

Upvotes: 1

Views: 69

Answers (1)

Ori Marko
Ori Marko

Reputation: 58772

You can't share a variable, you can convert variable to JMeter property using __setProperty

${__setProperty(propertyName, ${variableName})}

The setProperty function sets the value of a JMeter property.

And use in second thread group use __property

 ${__property(propertyName)}

You can convert it back to JMeter variable:

 ${__property(propertyName, newVariableName)}

${__property(user.dir,UDIR)} - return value of user.dir and save in UDIR

Upvotes: 1

Related Questions