课程: API Testing Foundations

今天就学习课程吧!

今天就开通帐号,24,700 门业界名师课程任您挑!

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…

内容