Re: [TechCornerChallenge #12] A script to get data from Petstore and add it to Excel sheets
I'll admit, I have not used swagger so I am not familiar with this particular method. Is it okay if I download the xml response and use that to fuel an XML datasource and write the script from there? I also do not see anything in the provided response that differentiates between cats and dogs
Digging a little deeper, it looks like there are three distinct ID values. 0, 5, and 55. I missed that at first, because the data I saw is mostly 0's so I lost the 5 and 55.
Click the Accept as Solution button if my answer has helped, and remember to give kudos where appropriate too!
So, to tell cats from dogs, you can use Tags. Since this is an open database, a lot of pets added there have no Tags. So, you can go ahead and add a couple of pets with Tags to it to be sorted using the POST/ pet method (https://petstore.swagger.io/#/pet/addPet)
DataSink is supposed to work with DataSource, so the DataSource test step will use Petstore's response as a data source, while the DataSink script will handle each pet.
I hope this clarifies things a bit🙂 Let me know if more clarification is required🙂
Sonya Mihaljova Community and Education Specialist
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️