Forum Discussion

technomage's avatar
Occasional Visitor
6 years ago

Unique property name for each thread with context.ThreadIndex


It is necessary for me, during a load test, in each thread, to have a property with a unique name so that it can be accessed by a thread during the execution of a certain number of steps.


In this manual written about the context.ThreadIndex property.

I tried to use it, but when using such a script:

testRunner.testCase.setPropertyValue ("EmployeePersonId" + context.ThreadIndex, result))


I only create the EmployeePersonId0 property, and all threads use it to write their variable. And I need to create EmployeePersonId0, EmployeePersonId1, EmployeePersonId2, EmployeePersonId3 ...
And each thread used its own variable.