[TechCornerChallenge #12] A script to get data from Petstore and add it to Excel sheets
Hello ReadyAPI Сommunity!
We have another task for you to put your ReadyAPI knowledge to the test. Check out the participation rules and the TechCorner Leaderboard here.
In this task, we will be having you use Groovy DataSink to write results from a data source to a file.
Task: Write a Groovy script that will take data from Swagger Petstore and add them to different excel sheets
Difficulty:
Exporting the results to one file can be done easily, but, sometimes, you need to sort data to different sheets inside it or to separate files.
From the request, put the IDs of cats in one or sheet of an Excel table, the IDs of dogs in another, all the rest should go to the third one ("Others").
Bonus: You can gain an additional point if you create two scripts: 1) for putting data into separate Excel sheets within one file and 2) into separate Excel files.
The best of luck to all participants🙂