Forum Discussion
DataSource is basically used to read-only the data not to store any data. You can use DataSink and update the value there. Just add 1 step as DataSink and replace "IdDataSource" with DataSink in code.
Hope, this solves your problem.
- jeev7 years agoNew Contributor
Its kind of solved my problem. I want to loop the ID into my next REST request step.
Now I have to store my IDs into DataSink Excel and Load the data (IDs) into datasource in my next step
is there any other easy way to do it ??
- avidCoder7 years agoSuper Contributor
As per my knowledge. you cannot write anything to DataSource but you can set the property value in DataSource like this:-
def response = context.expand(${Request#Response}) testRunner.testCase.testSteps["DataSource"].setPropertyValue("Response", response)
So, here if you are getting ID's at every loop, put this code there (Do some changes in code with respect to ID) inside for loop and store the ID's at DataSource property.
Does it sound good to you?
- TanyaYatskovska7 years ago
Alumni
Hi jeev,
Does avidCoder's reply help you? If it does, please accept this post as a solution (a big green button). It will help other community members find the answer faster. Plus, avidCoder will get some points to his reputation!