Urgent Help req: DataSink step to return each response with all the children
I learnt very recently how to use data-driven testing in Ready API and loop calls based on the data. My goal is to run the steps in loop and at the end create an auto-export facility with DataSink so that the results get auto exported.
Now when I try go to DataSink, as I understood I need to create column headers as below
to store the corresponding child values
Column Mapping from Response
It would work well, if the soap response for each of the siteId has the same XML structure. But in my case each of the 2000+ response that I get has different number of children within
For e.g. please take a look at the response 1 and response 2. Both these responses have different number of children.
Now, I need to further create a table using the whole response to be utilized in business intelligence. If I have to create matching headers in DataSink I need to go through each and every responses to ensure that I have created a corresponding property in datasink. It is not humanly possible without compromising the accuracy.
Is there any way to program Ready API to store individual XML response by each looping call in a file specified by me (2000+ XML responses) or to store all the values by children of the response node without needing me to specify all the header names in the DataSink window. If it happens, i will be fine in both cases to utilize a BI tool to create a corresponding table from there.
I can suggest two options....1 is totally overkill but it does give you what you need and more but the other option also its a bit awkward as you have to do it for each request. Also im unsure how it handles loops.
The overkill option (that i know handles loops) is using an event handler and you have a simple script that writes out the requests and responses (i use it to archive my test evidence). Advantage of this is that you only have to create one event handler script and it does all the work writing to a specific directory the inputs and outputs for each teststep.
The other option: double click the request to the navigator frame to view the request's properties. The Dump File property is the one you need.
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta