REST API Testing Tutorial : GITHUB Repos API Testing with POSTMAN( Live Project)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys welcome to the resting Academy and in this video we are going to do basically I am going to explain you one of the github repo API and we are going to write certain test cases around it okay so let's get started so place or let me show you the collection first one it's a github repo API so if you go to github calm your repo API you are going to get this one and this is the repo API it's available and what exactly we are doing here is that we have one get request right and then interesting thing is that to access this API you need a basic auth right so basic basic auth is basically whenever you is used to do a tenth occasion to the API server that yes we are we are alleged user and we have this username and password please please allow us to access this information from us all right so this is our authentication works and what we are doing is that we are passing basic auth and so let's start with first of all let me get tell you about the imamat valuable right so this is the environment variable that I am using I am using URL username and password right so I am using a dummy account where it has certain proposed and the username is AP testing and there is a password and the URL is going to be API note github.com okay so this is our environment and we are going to set them on using this drop-down right we are going to set two data and now the first request is basically basically the get request which basically tell us that this URL will come and I am going to use this yes and this URL if you hover over it it would basically going to replace with the dynamically using the environment and now the value is AP ID dot github.com right and we are going to access the all the repos okay so let's run this and see the fit is book and here we have 200 and we have already fished that our god I have like two a three this one is the first typo and this one test one is it another one and test two is another right so let's do one thing let's let me log in also so that you can see that yes so I right now I have logged in and I with API distinct II and these are the three repos are already at label right and I don't have any kind of test case but we are going to write some of them okay first of all we need we need to understand this one right so now the second call is a post one right and the URL is capital year so I'm going to replace this small one and this basically you can use this one the second link it's basically tell us how to create so to create you need to use this end point user slash repost and you need to pass certain things which they are mentioning in their APA documentation okay so these this is how you can mention the key value pairs of your lap oh right so here we have a content type as a JSON and body we are going to basically create a new repo with the name of ABC and I am going to oh this is just a dummy information and I'm going to create one okay so guys just make sure that authorization is set and we have passed the username and password and we are using using the dynamic variables and so that these are going to be fetch from this environment variable cool alright so now this has basically created a new repo so let me refresh it and see if it is created or not okay so now yes it is created here right so new repo is created let me see if the information that I have entered is yes so nothing is there but repo is created using the eBay right okay so this is how you can do it right so let's open up the API again and we can edit we can get get the repo right let's see how so you can get the repo but you need to mention the owner name and the repo name okay so this is this is the second one and let me replace this with small URL and now yes if you hover over it or you can use i-ight to see all kind of environment variable right and the environment business there is this or this one is a large or small small URL right cool so in the headers and in the body part you need don't need to mention because we are getting the information right authorization we are just mentioning or this header is not required good but I am going to send it and here we have information about the ABC coupe so now we have we are basically using the endpoint repos using him and power rapoo that we have created right so I'm going to use this patch command so this is the request this is the edit one and in do let's see yeah so you can what you can do is that you you need to use repo there are a co-owner which is API testing lis the repo name ABC and yeah here you can mention that you whatever the information that you want to update right this is a batch request source a smaller update right we don't want to create a new one because new will be created when we do put request if it is not already there but it's ABC repo is already there and we need to change the small detail so we are going to use it that request good and the content time the bytecode is work so we are going to name change the name so let's see which box and here it's it's giving us 200 okay message it means basically the it works and let me refresh it that to see if it is changed to ABCD or not yes it is chained right and it is also logged because here we are sending it that it's private Rapinoe so now it has become a private repo these are public records that's why the lock is not present good so we're successfully successfully created a batch request also for this github repo a pay rate now again we can use the gate get to see to basically check and it's going it will not going to work until we you do small one good and it's a similar one we are just getting older I pose now ABCD is there and do let's see another another one let's see so all of them will become test 1 test 2 and hollow and all four will become I know this already and you can delete the repo and but you need to mention the delete method and Oh repo the pose end point this is your username and you need to pass the repo name which you want to delete so let's delete this one okay but we need to change the URL good here we have so delete requests generally returns no content most of the time okay and it means basically it's successful if it has taken 3.7 seconds and let's see if it is deleted or not yes so it was deleted right so this was a part one about it and in the second video I'm going to give you the lead test cases for it okay thanks a lot bye
Info
Channel: The Testing Academy
Views: 23,689
Rating: undefined out of 5
Keywords: newman postman tutorial, api testing, newman tutorial, newman, postman, api, jenkins, postman chrome, postman restful, postman collection, what is api, software testing tutorial, newman test, newman test automation, newman testing tool, postman newman, postman newman docker, postman newman install, postman newman jenkins, postman newman reports, postman runner tutorial, postman newman tutorial, newman api testing, newman cli, postman command line, api testing tutorial, testing
Id: QUwA3IL7OU4
Channel Id: undefined
Length: 7min 51sec (471 seconds)
Published: Thu Oct 31 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.