2
votes

I have the following question for Jmeter. Request your help.

  • Across my test plan(within the same thread group) I have created multiple HTTP requests which in turn uses multiple Java sampler to process the information and puts it into a certain user defined variable which finally goes into these HTTP requests body. All these java samplers are classes, while some of them has static variables which I have used as counters and also to hold some request specific data. All these classes are jar files which I have placed inside the lib\ext folder of Jmeter.

I would like to know w.r.t static variables/classes in the sampler I have used & assuming One loop inside a thread group is termed as one run

  • Will the static variables populated in run-1 be present for run-2 and further runs as well since it is static?
  • Since these runs are going to be concurrent, will the static values get messed up?

Many thanks.

1
Thanks. I just logged in. - Jades

1 Answers

0
votes

The answers are:

  • Yes

  • Yes

2 solutions:

1/ In a Setup Thread Group call, use a Beanshell to reset your static variables

2/ Synhronize access to static variables