I am getting dynamic data from output file. I want to crate dynamic name and value inside DataSink. So that, the values are stored into it accordingly. Lets say. I am getting book names as AJANTA, DIKSON, PIRATE, SONIC. And sometimes I will get 6-7 values also based on output. I want to store this dynamic book names to DataSink with the "Name" as Book1, Book2 ... So.. On and Similarly "Value" as AJANTA, DIKSONm PIRATE, SONIC stored into the correspoding Name.
I have tried this code:-
String storeToDataSink (contains all the book names)
testRunner.testCase.testSteps["DataSink"].setPropertyValue("Book1",
storeToDataSink.toString())
But this works, when I knew that I have particular number of books. What if it is dynamic?
Any suggestion or code snippet would be appreciated.