From the course: API Testing Foundations

Unlock the full course today

Join today to access over 23,400 courses taught by industry experts.

Testing GET calls

Testing GET calls

- [Instructor] You know how to call a GET request but how do you go about testing one? At first glance, it seems like they'd be pretty easy to test, right? You just send a request to the server and check that you get back what you asked for but right there is one of the challenges already. How do you know what you should get back? What if you get back something unexpected? Did you send the request in the wrong format or did the service or API do something wrong? Well, there are many heuristics that we can use to help answer these questions. One that I want to look at is consistency. There's a lot of different ways to look at consistency. One way is to check if different parts of the API return the same data in the same format. So for example, in the ToDo API that I've made, if I call the /user endpoint, you can see that we get back the username, along with some other information, like the email address, et cetera. But…

Contents