lpd
lpd

Reputation: 2347

JMeter share setUp Thread Group variables with normal Thread Group

Imagine I have a simple test plan, like so:

setUp Thread Group
-- Http Request
---- JSON Extractor

Thread Group
-- Http Request

tearDown Thread Group
-- Http Request

By default, the variables extracted in the setUp Thread Group will not be accessible within the ordinary Thread Group nor the tearDown Thread Group. The variables' contents are different for each user and cannot be precomputed and loaded into the test plan. It is not possible to simulate the correct load using a single user.

How can I access each thread's setUp variables from within the corresponding Thread Group proper and tearDown?

Upvotes: 5

Views: 7011

Answers (2)

Ori Marko
Ori Marko

Reputation: 58882

You stated in comments

5000 distributed threads.. transferring multiple variables...

Maybe JDBC Requests will help you to save(insert) variable to database and get(select) variable and delete/update variable wherever you are in test.

Upvotes: 1

Dmitri T
Dmitri T

Reputation: 168207

JMeter Variables scope is limited to current Thread Group only, if you need to pass some data between different Thread Groups you need to convert JMeter Variables into JMeter Properties:

More information: Knit One Pearl Two: How to Use Variables in Different Thread Groups

Upvotes: 7

Related Questions