Forum Discussion

pratoa's avatar
pratoa
Occasional Contributor
8 years ago

Change JSON body for POST - REST endpoint in Load Test

Hi,

 

I am trying to create a Load Case for a POST - REST endpoint, but for each thread (virtual user) I need to change the JSON that  I pass in with the POST. In other words, there is a field in the JSON for a memberID and I need that memberID to be different for each thread. 

 

How can I accomplish this? 

 

Thank you.

5 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3
    You may use something like below:
    {
    "memberID" : "${= System.currentTimeMillis()}"
    }
    • pratoa's avatar
      pratoa
      Occasional Contributor

      I am trying to do the Load Test externally using java and the Wsdl classes. Do you know by any chance how can I go into modifying the JSON of the POST from here? I can't seem to find a way to get the body of the request

    • pratoa's avatar
      pratoa
      Occasional Contributor

      Sorry, I rephrase my reply. What if I have specific value for the memberIDs, they can't just be random values. I have them stored in my db.