Forum Discussion
Change from :
testCase.setPropertyValue("memberId", "182996");
To:
testCase.setPropertyValue("memberId", System.currentTimeMillis().toString());
Thanks for your response Rao. The thing is I have an array lets say with 100 memberIDs, those are the memberIDs I need to use, they can't just be random numbers. Inside my JSON I also have a groupID which is the group that memberID is part of. I also have another array with the groupIDs I need to use.
Is there anyway to get every thread, and change the properties of the TestCase just before a thread ("user") is created for the Load Test?
Thanks!
- nmrao8 years agoChampion Level 3
Then you can define the list with valid values in a groovy script before json request step
def list = [12343, 12345, 342432,3432,32131]def index = new Random().nextInt(list.size())
context.testCase.setPropertyValue('memberId', "${list[index].toString()}")
Related Content
- 2 years agoTestQA1