Forum Discussion
It's been a while since i last played with DataSink objects, but from what i remember your DataSink might be in the wrong position in your hierarchy.
If you move it immediately before the DatasourceLoop object and uncheck the 'Append' flag, "i think" that it would write each url to the same position each loop (overwriting each time) resulting in the final loops URL being saved to the spreadsheet.
Or....rather than bother with a DataSink, you could use Properties (TestCase or TestSuite properties) instead....i.e. write each loop to the same property and then it would only persist the final loops URL (cos each time the loop writes, the previous loop would be overwritten)
If what i suggested with the DataSink doesnt work (and no one else has any better ideas) and you only want to use DataSink rather than Properties, send a message back and i'll set it up on my machine and i'll work out how to do it, but you have a number of options how to do this.
Cheers,
Rich
- Darshika3 years agoNew Contributor
Hi richie ,
I have already tried the Data Sink placing before the Data Source Loop but still the Response data is not written in the Excel.
I can't use the Properties test step as of now as i am preparing the Regression test suite in which positive as well negative test cases are executed based on the flow defined in Excel .
Here I am trying to give you the brief idea what is exactly my approach in ReadyAPI so that you can assist me :-
We have around 100 APIs & we are validating the response of APIs using Assertions with multiple Negative as well as Positive data sets (Regression Testing) so to achieve this we are using Excel workbook & concept of Data source to Read Excel & Data Sink using which we are trying to write the Response data in a separate sheet & picking these values using basic formula of Excel in any another sheet which is further used as a Data source of next APIs
We have Positive as well as Negative data set in same sheet along with the assertions which are matching at run time & marking test case as Pass or Fail.
If we use Properties Test Step then every time positive value will be passed in Next APIs which is not handling my cases properly because I Have to test field with different kinds of data including negative or invalid data as well as .
- richie3 years agoCommunity HeroHey Darshika,
Ok....i'll try and have a look at this tonight sometime.
BTW, ChrisAdams made a very valid point however that id forgotten. Because of all the problems i found using spreadsheets i stopped using them about 3 years ago for any DataSourced/Looped test. I only ever use csv's now cos of the problems i found.
I admit csv's dont support multiple tabs (like a spreadsheet), however if you can bite the bullet and separate out your tabs into individual csv's, thatll save you a lot of hassle. You can still edit and manipulate your data in Excel, but sourcing data from a pure text file is a LOT easier ive found.
Just something to think about....
Cheers,
Rich
Related Content
- 5 years ago