Forum Discussion

Rookie's avatar
Rookie
Occasional Contributor
8 years ago

Would like to dynamically add variables to DataSink using groovy.

Hi,

 

I have a testcase where i am getting a response back from a REST request.  The problem is the values inside the response is dynamic.  For eg if i send 1 request today, I will get customerAddress1 and customerAddress3 back. If i send the same request tomorrow, then I will get customerAddress1, 2, 3 and 4 back.

 

I am trying to capture this dynamically generated customerAddress'es and send them to dataSink, so that i can generate all the data in an excel file.  Currently I have to create customerAddress variables in dataSink, and then set the values during test.  But i want to dynamically generate these variables during runtime (because, as u can see, my data is dynamic).

 

Please help.  Really appreciate any input.

 

Thnak u.

No RepliesBe the first to reply