From the course: API Testing Foundations

Unlock the full course today

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

Testing PUT calls

Testing PUT calls

- [Instructor] Put calls are used to modify objects. In this video, let's look at some of the things that are specific to testing put calls. With put calls, the IDs of the objects that we are modifying are an important testing consideration. As you can see here I've got this task with ID 78 ready to modify. If I send this request, the task is updated without issue. But what happens if I try to specify the ID here in the body as well? So let's try ID and let's put in a different ID than the one that we have specified in the URL. Let's send that and see what happens. Okay, so this is good. It looks like it used the ID from the URL and that's something that I always check for when testing put requests. Another check is what happens if you give it an incomplete body. So let's look at this with the user endpoint. We'll first get a list of all the users and down here you can see we've got this test user and it has this…

Contents