0

Thread Group1 will create an array Array1 stored in memory(code is in JSR223 Sampler) and the data from array are passed to Request1 present in same thread group. Array1 will be updated every minute during test execution. Thread Group2 will create an array Array2 stored in memory(code is in JSR223 Sampler) and the data from array are passed to Request2 present in same thread group. Array2 will be updated every minute during test execution. Thread Group3 will create an array Array3 stored in memory(code is in JSR223 Sampler) and the data from array are passed to Request3 present in same thread group. Array3 will be updated every minute during test execution.

TG1 TG2 TG3 are added to a test plan and all thread groups should run simultaneously.

Issue we're encountering is any 1 Array data is being used by all 3 requests. Eg: Array1 data is being used by Request1,2,3 or Array2 data is being used by Request1,2,3

But when we disable any 2 TG's and run only 1TG. Test runs correctly. 3 TG's are using only 1 array data when they run simultaneously.

Note: Array1, Array2, Array3 are stored in memory and will be updated every minute with new test data replacing the old data.

How can this issue be fixed?

Riya
  • 9
  • 2

1 Answers1

0

We're not telepathic enough to suggest "how can this issue be fixed" without having a Minimal, Reproducible Example, in other words you need to show your code at least partial.

Normally if you use __P() function to refer the property you will be able to update the value in the runtime and each time __P() function will be executed it will pick up the new value.

enter image description here

Be informed that properties are global across the whole JMeter/JVM process so whatever thread changes the property the value will be immediately updated everywhere.

If you want to see what exactly happening under the hood you can enable JMeter debug logging and look into jmeter.log file, it will also contain the reason of your JSR223 Test Elements failures if any

Dmitri T
  • 159,985
  • 5
  • 83
  • 133