In order for me to firm up my understanding of API testing I’m looking at testing against some real-world API’s. For understanding, I’m going to be writing my API tests in C#, ideally utilising RestSharp
I was just after some advise from people as to some API’s which would be good to test against for training purposes, as hopefully some of these have been utilised in the past by people. I’m looking to cover off different types of authentication, parameters and headers being passed across, sending different types of requests(GET, PUT, POST etc) and in turn analysing responses(be it in XML or JSON format)
I have created an API that meets your requirements that can be found here: https://restful-booker.herokuapp.com The API has documentation around for GET, PUT, POST, DELETE and PATCH requests and they support either XML or JSON. There is also different types of authentication, both Basic and token based for you try out.
Additionally, I have a repository that contains different language flavours of an automated API checking framework to try out. You can find a C# flavour which @g33klady contributed that shows how to build API checks and organise your requests and payloads. Feel free to check it out: https://github.com/mwinteringham/api-framework
Thanks for the shout out I have some other examples (along with workshops on using C# to test APIs) in Github (for instance, https://github.com/g33klady/TodoApiSample/tree/RestSharp) and can help out if you have questions on the C# side
Hi Mark, sorry where I am fairly new to API testing I’m having difficulty working out exactly the steps I need to take in order to get things up and running. I’ve got as far as cloning the resful-booker API locally, but I’m unsure after that what steps I need to take to:
a) get the API up and running
b) write some tests in c# against the API
It is the very early days on this, and these are certainly not ‘real-world’ APIs, but I have been working on some API testing challenges. I’ve been trying to find APIs to learn testing on and I’ve found that there are plenty available for testing GET calls, but not much for POST/PUT/DELETE, so I decided to see if I could put together something that would be helpful for other testers.
My current work on this can be found on github (https://github.com/djwester/api-testing-challenges). So far there are only two challenges (and they are pretty rough at this point), but if you are interested in trying them out feel free to do so. Let me know if they are helpful!
No they serve slightly different purposes @duncan.nisbet. AiT online is designed to work with different tools and testing approaches, where as restful booker is purely API focused.