API Testing: Fundamentals | Winston Castillo | Skillshare

API Testing: Fundamentals

Winston Castillo, Learning is the way

Play Speed
  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x
4 Lessons (23m)
    • 1. Introduction

      2:30
    • 2. First Part Concepts

      9:00
    • 3. Second Part: Guided Activity

      10:40
    • 4. Third Part: The Challenge & Conoclusion

      0:45

About This Class

In more than 15 minutes I will teach you anything you need to know about API Testing and how to run your first test cases

How to create Test Cases Class

Rest Client Program Download Link: https://www.postman.com/

Transcripts

1. Introduction: hi students on extremely happy to see you again. I guess if you are here, it is because you have bean in another off my classes. If you don't, please go to my profile and check all of my classes about your IQ testing and basic programming. Today I am going to teach due in 15 minutes how to perform on a B. I destine on the importance off these kind of testing in the so far industry. You will understand there's such a front end and back hand on the necessary information to perform these kind of testing. So in the end of the class, you will produce three different days. Cases on you will use postman to run those queries in your documents. So let's start with this amazing class. This class is a three part class service. One is about concepts. Second part is a guide. Activity on their part is a challenge to you. So let's just start with today's class. What a P I testing piece. A P I is tons for application programming interface, which enables communication and that changed. Do separate self for systems. A software system implement or a P I contains functions are super teens, which can be it's acute by another. So four system AP A Distinct is a so for testing type that validates application programming interfaces. The purpose of a pH testing is to check functionality, create avidity, performance and security off the programming interfaces in a B A testing. Instead of using a stun our user inputs or keywords on outputs, you use software to send calls to the AP, get out boots and no down the system response. It mainly comes and trace on the business logic night here on the so for a teacher. 2. First Part Concepts : So for adventure. Remember that you work as a tester. It means that you have to provide another perspective to the team. To do this, you have to understand how the suffering spiel on instructor nowadays, before starting any AP itis in, you have to recognize some turns, so let's start with them. Did you remember Mother Control Abuse Architecture with the A P. I G. Communicate directly to the model. If you don't know so much about NBC, architecture in won't be necessary to deer on this topic. He doesn't means it is trivial or not important. Instead, what I want to say is all that you need to know. I am going to describe it here. A model grabs did that you need for us a specific problem domain or a type off solution you are trying to build. Controllers are the leader. Armenians who provide communication between the view on the model. Under views are the beast soil aspect off the user interfaces. Abuse can be reused or reconfigured to show different intense off model that in a be a testy you will jump debut on the controllers and you will ask the rhetoric to the motive some that poor pose will be to verify the model is providing a correctly. The information you will require is on the screens or bill off the system. So how you set up on a P A test and vitamin A B. A testing is different than any orders off for testing types, and yet you are required to set up initial environment that invokes a P. I will require set off barometers and then finally in summons the test results, hence setting up testing environment for a pH testing. Since a little complex that are based on servers, she'll be configured as per the application requirements. This cases for a P I testing that this case is a pH. Testing are pretty similar to day regular. This case is so remember you have to document everything in your test case about preconditions. Steps unspent, the soul so usual, including your test cases, documentation, things like return Baalu based, um, input conditions. And when your test doesn't return anything when you treated some order a P I event or in the group and the thin when you date your data structure from day from the response you received from your a p I. And when you modifies, there's certain researchers. Those things are important. Your test case for a pH testing, if you have any. Any questions about the way the official create a test case? It's a class in my profile that you can go and check approach off. 88. Testing. The 1st 1 is understanding the functionary of the A P A program, and clearly they find this coat off the program. A blind testing techniques such as a cabling classes, boundary Baalu analysis and error guessing. Also input parameters for the A P. I need to be planned and defined appropriately on the another approach of AP itis is it's a cute the test cases UN compared Expect results on actual results. There are a lot of different between a B. A testing on unit testing. What what is that? Because the A P A testing is in the final problem, but the unit testing it is performed in a piece off hope. So this M it's elaborate. What are the different between those kind of testing for the unit Testing that Bell occurs ? Performed the unit testing, but the just thing is performed by the testers, the unit testing separate functionality when he's just but the A P A. Testing is an end to in functionality. Okay, you are testing the name to infertility. The unit testing a developer cannot says it's old coat unit testing, but the A P A. Testing testers cannot access the soap cold in the unit. Testing the user interface is also involved. But in the A B testing, as I told you before, you are testing the model. So you are behind the user interface and you never test the user interface when you are testing the yet in the unit testing only basic functional reason. Our test. But the A P A testing old function that eases artists in the unit testing the limits is a scope, but in the testing, the brother is this cold into unit testing. It is usually wrong before check in, but they be a destiny is run after beauty is created. What are the challenge off the A P I testing during off challenge to perform on a pH testing? But the main challenge is with a P A. Distinct is a barometer combination a parameter selection and called second see there is not a user interface to test the application with makes difficult to give input battles by elevating a very fun in the output is different system on a little difficult for tester parliamentary selection and categorization is required to be no to the testers. Other things at this point tester shoes, No coat. So and maybe not some thing simple Teoh Junior tested to perform, but And when you are use, you know they wait are so far this bill, it could be simple to you. The understand in a p a in the a p I testing you are going to receive different status coats their on off different status. So I'm gonna try to give you the first number, and most of things are overs are yet up to 100. So what I'm going to explain your here is what happened. If your response is located in one of them off the numbers I'm gonna provide because of the living off the time I on attaching under coming with the different ghosts you can receive in the Navy, I request. Just go to the description on download the document that I'm providing you the category 100 is an information off. If yours event 100 cold, it communicates trampled protocol lever information If you receive at 200 cold, it means success is indicates that the client request Works said successfully, if you receive a 300 cold is that regulation? It indicates that the client must take some additional action in order to complete day requests. If you receive on 400 response is a client error Everything with 400 Indians error. This category of every stars called points the finger at the client. So it means that something is happening in the client, that you are receiving that error. And if you receive a hot 500 m of 500 go, it is because the server is having error. Okay, so please take the time to verify it on review the document that I improve. I am providing to you where I determine and I elaborate each off the coast that you can receive enough in the AP requests. The tools for a P A testing are many, many difference. So I'm gonna put my attention on corn and postman and then explain these tools in the nets section. So the first thing is that we are going to down or it on anyone. Explain the interface before running any off the test case that I am preparing for you. So let's go to the Nets Exception. 3. Second Part: Guided Activity: we are ready to go to the Nets instead. Now I'm gonna need you to install the rest. Problem with. Discussed in the perception the installation link isn't the description off the video. The order problem you're going to me is an editor. To grind your test cases is everything said in your computer. So let's go to the dance exception Well, and now it's time to run your first AP I test him. So in order to make it, you sure had already created your tears case. Maybe the test case on using these format to show you that this case, but in your in the class, you're going to allow North another document. It's kind off with my did sign off my website and everything related to my brown. This is the test unusual cared about. If you don't know so much about this case is, go to my passable test cases. It's easier to learn how to create a This case is not the big deal, but we'll when you aren't acting on a P I. When you are texting on a P, I, you should have some information. How the a p I work. We are going to test the A P I for NASA so you can have the documentation here. So if you see here, there is a lot off documentation that provides your information how to run the test case in this. In this case, if you want the astronomy picture after day, they ask you to create a key. If you don't have any key, you can use the day mochi. But it is necessary to send all the parameters for the quickie. Whether the parameters the parameters are after the question mark, this is a barometer, and this is what you need to learn your test cases. However, Do you know you can create this case? Is something why what happened if I don't say they this parameter or what happened? If I don't send the date is meditate today. So it means that if you don't have any date, it won't send you the E much off the day. Okay, So, Well, the first thing is that you have to create a dis cases. There are love off possible with scenarios that you can use to grow in your test cases. But I just used three different in this case is Bruce. One is to rum with the fourth data and we, the Maquis. The default that I was going to be take it, take ill without the date. The 2nd 1 is by sending on a specific day to receive a data on the last one is to send it without know the Marquis. So that's all that we are going to do now. So, uh, that's the reason I ask you to. I am asking you to have an editor. So what I'm using is there is the Google is the the girl s spread teeth. So there are free and you don't need to down of any other problem to your computer if you don't want the oil is postman. This is the rest client and that we are going to use and the you can download it for free in the link that I provided you in the description off the video. So here I have the test case that I don't really create before with the information that he had fronted our communication. Okay, So what are the steps that preconditions is? You need the rest time. Throw him an operative risk area. Chris, Clients so more. And here it is On here you will have old the interface for the for to run your a p I testing. So here you can had the possible requests that you can run for your A p I You can run and get post put patch delete Copy head. How do you know where will be the meto you sure use in the documentation here It says that only you can use get It means that if you run a boot it sure not, Rob. I do anything I need should give you happen Error if you try another method. The documentation is huge Important to run your taste cases because what you're testing here is the backhand. What you're testing here is something that you don't see mostly in the user interface. So that's the reason you can use a You cannot use bro's. A bouncer on if you use it is going to if you are going to have the same this in and behavior that you have here. But the only difference is that you cannot say another request that they done gets with a browser. Okay, so that's the reason you need actually a rest clien problem. So what What is the disguise? This this case, what are the steps for that? This case, you need to send a get request to these ive so you can use this control See and running injured in your press time problem. So what you're going to receive here? Here you can said all your parameters on when you cleats in, you are going to receive our response on everything that you can do is to download your code for older can off of then to run the same request in other problems, But I told you, is that we were going to use core. Current is something that you can use also your terminal and in the window. You can use it in your command window and you don't need to two down with anything else. So if if I send this, do them and through the terminal and I heat enter, I am going to receive the response, then asking for So let's ignore this for a moment on list this running through the a the rest trying brother. So if you see here, you can send it away. Just kidding this bottom so If you see that this case, it's insane. I get requests to this year. Er the final Lincoln Command under your terminal window. This is the way that you should create at this case for an 80 I on this is suspect The result, it says that used to receive you should receive at 200 response. Okay, on the follow with days of body. So you see that if that happened, if I send you where it should receive here this titles is 200 and is the gates. And what it means that it's correct the request. What is the second test case that I need to wrong? Is this one? It's Saturday the same. But here, I need to send and get request to http. Uh, there is a date on Worry why we are using a date because it says that received the data for a specific they with the monkey. How I should order these. The communications is everything. Year, month on date is simple and really easy to run on. Builder request here. If I sit here, long story I didn't copy could be And let's see if okay, and if it it's in 200 And what issue received here to Syria? Syria in the response body. Copyright math here. Do you Okay? It seems like on receiving the correct information. So what do you? What I usually do is to review that all my fields are being saying here. So I got they hold the hold information here. So the last one is descend on without with No, the mochi. With what? I had to sit in his seat, get requests, Do you? Each did it. B s a p i NASA gulp. And while one of you I need to remove all the parameters here, eight says that and going to receive a 43 forbidden responsibly, Chief, that's correct. Yeah, for sure. Loves three forbidden response. And these suspected missile would that say you are really did come to continue playing with the A p I and trying to send order request using the documentation, you are free to use as many as you want. And you can even, um, work with ah every week with your imagination and to provide different as an artist. Intense. These AP I from the a p I nursery. All right, to provide this data and to provide some data, and that data is going to be used in different user interface foran application. Why did NASA is giving this information for free? It is because you can use the information to create your own and your own application to show so off the information they provide daily. So there. That's the reason it's free and you can use it to practiced. So yeah, that's everything that you need to do. You can run their the desk cases that are in the description, and now is time for the change to you. 4. Third Part: The Challenge & Conoclusion: exception to is done Now I got a challenge for you. Here is the challenge Can you try to send on Not alot methought old force You don't fight with Halloween and point to complete the challenge. Create your test case and safety requires in cork meant and share it in the comments off the class Congratulations. We are all set. We reach the end off the class Remember to lock your projects on Commend this class nets class is going to be about backhand and how to work in the back in part. See you in the nets video.