Postman: Learn REST API Testing | Victor Gorinov | Skillshare
Play Speed
  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x
17 Lessons (1h 38m)
    • 1. Welcome

    • 2. First Steps and Installing Postman

    • 3. Understand Postman UI

    • 4. Create your first API request

    • 5. What is Collection

    • 6. How to Run Collections

    • 7. Variables in Postman

    • 8. Postman Scripting and Snippets

    • 9. How to create and manage Environments

    • 10. How to Create first TEST and use Snippets

    • 11. How to Debug API Request

    • 12. Run Postman from the Command Line Using Newman

    • 13. Learn Workspaces

    • 14. Run Collections using Collection URL

    • 15. How to Run SOAP Requests in POSTMAN

    • 16. How to Chain API Requests

    • 17. Thank You!


About This Class

Start Learning Postman in 2020!

Essential for every Quality Assurance Engineer.

★★★★★ "The course is very informative and helpful. The tutor explains the subject very clear and in a friendly manner. I will watch it one more time. It definitely worth to buy. Success"

★★★★★ "This is one of the best API testing software testing courses, everything was useful and explained very well."

★★★★★ "Great Postman tips and tricks, definitely worth it!"

★★★★★ "Useful, in-depth walkthroughs. Instructor is knowledgeable, genuine and speaks in a calm, paced manner."


This course will give you the foundation and confidence to test REST API's with Postman.

You WILL Learn:

  • How to create and test API Request in Postman

  • Collections

  • Varibales

  • Scripting in Postman

  • Environments

  • Create tests in Postman

  • Test SOAP Requests
  • How to debug

You don't need any experience to start you will be guided step by step through this course.

This course requires work in the beginning - just like any other thing in life.

If You Are Someone Who:

✔  Want to Become Quality Assurance Engineer

✔  Want to learn Software Testing (Back-end more specifically)

✔  Want to Change Career

Get Started Today!

You will also get:
- Support and Answers to All Your Questions During the Course

I'll See You in the First Lesson!


1. Welcome: Hello and welcome to this postman tutorial for beginners. My name is Victor, and I'll be your teacher for this course. I have designed this course for anyone who wants to learn how to taste. Rest AP eyes with one of the most popular tools in the software world, which is post in this course. We will go very basic and you learn step by step, how to create your first AP I request how to create and manage collections called to create variables, and why do we use them both month? How to create and manage environments? Help toe de Book your A P I requests how to run a postman AP. I requests from the common fine, and in the later stations you learn more advanced topics like how to taste soap requests and help to change AP requests. If you're a developer or a cure engineer or just someone who wants to learn this available skill, Taste raced a PR quest with postman. This course is for you. We will go very basic and step by step, and by the end of the course you'll know how to use postmen and that's raced. A P I requests. I thank you for your time, and I look forward to see you in the first lesson 2. First Steps and Installing Postman: Hello and welcome to the first lesson off this postman course. And in this first video, we're going to talk about what this postman and what we're using it for. And after that, we're going to install Postman on our computers. So what is Postman? Both Monk is on a P I client, which is used to develop, test and document AP ICE, and it started in 2000 and 12. But right now it's one of the most popular tools for a P I tasting and the A P I stands for application programming interface, which allows software applications to communicate with each other via AP. I course, basically a P I coast ensured that there is communication between software applications and we need to test this communication to ensure that the information is the expected information and everything is correct. And we're going to test these AP I calls with postman. Now let's go and install Bulls Month on our computer. We're going to write post month in Google, and we're going to click on the first link. So get porton, get postman dot com is the website. After that, you're going toe end up here on that page and we're going to click here on the product. And after that on post month and after that, we're going to click on Download the APP, and we'll end appear where we're going toe, click, download and download 64 bits if we're using windows. If not, you can doll it loaded for Mark always from here. But I'm using windows, so I'm going to click Windows 64 and I have already already downloaded the application. So I'm going to cancel that and I I'm going toe started from my desktop. We're going to wait for a couple of seconds to install what is needed. So I ended appear, But it may ask you to make on account. So if you don't hear from you account just put your email, your user name and password, and after that, you you will end up here, just close this window. And, uh, this is this is it the installation process? It's really easy. And now we're going to talk about everything that we see here on our screen 3. Understand Postman UI: Hello and welcome to the second lesson off post mandatory ALS. Today we're going to talk about the user interface off postmen and basically water all of these buttons here in on our screen doing so if you don't have any experience with postman , don't worry. We'll go really easy, step by step. Ah, this will be for complete beginners. And by the end of this course, you you will be able to do a lot of things. I'm sure. So let's start right now by, um, by making sections here in Postman Postman is made off hither, off sidebar and builder and basically are hither is just the top off the application right here. Right. This is our Heather on the top here on the left side who have sidebar, which is this thing right here. And, uh here in the the middle. This big section is called builder, and most of the things we're gonna be doing and looking here in the builder. But I want you to understand that we have three sections header sidebar and builder and the Let's go now 11 by one. And see what we have in the hither in the sidebar and in the builder in the header. We have these buttons right here on the top, left from the new button, we can create the and your request new documentation collection, your environment and basically you create. Ah, you create your requests from here because this is, uh, most of the times we're going to create requests and collections. Ah, you have this import bottom from which you can import files. This runner this open new top four small window or our runner window. You have this? Ah, button right here. From which you can select your workspace. If you have a couple for expenses, we're going to have only one for now. Or you can create a new workspace on the top, Right? They have these buttons where we can capture ap requests you have settings, you can notifications. And if you want to a break here, you have this bottom. But we're going to use the the simple postman. We're not going to pay for ending right now. And this is what you have in the heather. Also, you have ah, on the top left here, file new view and help buttons. Menus, actually. And here in the help menu youth. You can check the documentation off. Post manos would give her the Twitter and the support. So these can be pretty useful for you here on the left. On the sidebar, we're gonna be using the history and the collection tops. Now, in collections, you'll see all the collections that we're going to create in the next videos and the history we're going to C r a p I cause that we have been doing in our history, Um, you can the drag these to make it bigger or smaller. And also, if you're using smaller screens here in the view menu, you have the option toe toggle the sidebar so you can ah, you can toggle the sidebar from here If you're using a smaller screen and the of course, you can ah, make the size that it looks better for you. And this big section right here in the middle is the builder, and most of the work is going to be done here in the builder. We're creating our requests here in the builder, and we're checking the response from here. And if you want to go to see the the request in the response side by side, you can click on view and toggle to pain view, and that way you have the request on the left. In the response on the site, you have them side by side, and if you click it again, toggle to pain view. You have the request on the top and the response here on the bottom. So this is a simple view off the postman user interface. Now let's continue with the next lesson and create our first AP requests. 4. Create your first API request: hello and welcome to this lesson where we're going to learn how to create our first AP request how to run the request and helped tow analyze the response in Postman. So let's begin. And the first thing that we're going to do is we're going to create a workspace. So click here on in the middle on the top middle, where it says my workspace and create new. We're going to create our first workspace. So let's call it Ah, work space one and the create workspace. You can put the summary here, but this is optional. So we're going to create ah, personal workspace. So click on personal and create workspace. And from here you can choose the workspaces if you want to switch from one to another. But we're going to stick here on workspace one. And now we're going to create our A P I request and how we we can do that. We can click on that button here, and after that on request, or we can click on file new and you we will have the same screen right here. Uh, and we're going to click on a new request, so create new again from here or or from the arrow, you can just click on request or click on new. And after that request, and we're creating a new request from from here. So let's goto our browser right now And, uh, in Google type simple A piano requests, and we're going to go to this our e q r a e s website. And this is a website that is giving us a simple a ps for testing and we can take from here get post put, delete all kinds of requests, and there were going to get this single user know this one, this single user and get request. So what I'm going to do right now is I'm going to take the You're the urinal from here, and I'm going to a new top, basting it. And after that, I'm taking the the request end point from here. I'm coping this and I'm pasting it here. Actually, we have two slashes here. We need to only want and I press enter, and we can see that this is working request. Um, there is a response. I have some information here and now I'm going to take this copies. Yeah, you have that. The your ill. So the Ural, the euro off the website slash and the request endpoint. So I'm going toe paste this in our post month, and you can give a name to your request. Whatever you like, I'm going to call it get single user, and the in order to create this request you need toe at this request, request toe existing collection or to create a new collection. We're going to learn more about collections in the coming tutorials. But for now, I'm just going to create a new collection, and I'm going to call it Collection One collection one. Okay. And the were going toe at this request. Name toe this collection that we have just created so safe to collection one. And we have now our collection. So the collection is basically just our folder, which, uh, which we put our requests in tow. So collection is something that half hour requests inside of it. So inside of this collection one, we have our get to request get single user. So when you click on the request in the builder, you'll see the request. And if we put right here, the ural and we don't need anything else right now, because this is a get request. So I'm just clicking, sent. And the as you can see, we have a response. This is the response from the server. Ah, and this is the body off the response. We have this information right here. I d email first name, which is Jennet last name Weaver and this avatar. And, uh, you also have here cookies, headers, and this results. So if you create some tests Ah, you have the results here with verifications, but we're going to talk about this later. And this is your body. And something really important is that we have here the status off the response that time into the size of the response. Right now we have started 200 which means, OK, that everything was successful. The time which it tooks from the server toe bring us the response and the size, which we can see the actual size off the body and off the headers in the response size, A total and we can save the response download and we can view the response has a role for four month, just like we saw it in our browser in Jason for month preview and all kinds of for months, but pretty ihsaa. And this is more readable for the human eye. And it's pretty self explanatory. You have values were you have some variables and values here. So I d to email. Is Janet Weaver at? Are you R e Q r E s 19 1st name Janet last name Weaver. And this is our response. And also, you can search for a particular value here in your request. And also you can copy from here Can copy the request. The request to our your keyboard. Um, here on the left. In the history, we have the history off the requests requests that we have made. So if you come here and send it once again, you'll see. Now we have two requests sent again. Now we have three requests. Basically, you have all the history off your requests here and in collections. We have our collection, which consists off. One get requests so far. And the that was it for this tutorial we have ah, just created our 1st 1st request. And we have also analyzed the response from the request. So I think it was pretty useful. I hope so. Now let's continue with the next lesson. 5. What is Collection: Hello and welcome to today's lesson where we're going to talk about collections. We're going to learn what Issa Collection, how to create a collection, how to create folders inside of collection and how to arrange requests inside of a collection. So let get started. What is a collection? A collection is a group off off requests? That's it. Simple as it sounds, just the group oh requests and the We have already created one collection, and you can see that in our collection. One. We have one request right here, but its really useful. If you have a lot of requests, you can. You can arrange your requests in folders in southeast inside of your collections, and it's really useful toe everything in order and to know what he's doing. What And, um, how to create the collection? You're already know we have created one, but let's click here on the new button and in the screen we're going to click on collection , so create new collection. And this time we're going to give it a name off collection, too, because we have already created Collection one, and, um, you can also put the authorization type here, which is really useful if our you're going to use, for example Ah, user name and password. For all the requests inside of this collection, you can sell it basically authentication. Then put your user name and password here, and this is gonna This is gonna be used. Um, with all the requests inside of this collection, you don't have to put it in every single request. Um, but for now, I'm going to use no authentication. You can. You can put the pre requested scripts also, some tests that you will care for in common for all the requests and some variables that are going to be common for all the requests. But we're not going to put anything for now. We're just says putting, ah, name off collection to and we're clicking on create. And right now we have two collections collection, one in collection to inside of collection one. We have one request and the inside of collection to We don't have anything so far. So if I click on this arrow right here next to the collection too, um, I will give ah the option to share this collection toe another workspace, for example, to run on this will open the collection roller, which is really useful if you careful other fire requests that you want to run them a wall in tow if monitor where you can see if something failed and much more. If I click view on whip, this will open the browser and with these dots you have the option toe edit the collection toe request to duplicate export to monitor collections. And what the is going to be really useful for now is toe at folder. So click at folder and this folder name is going to be for all our our get requests. So name off the folder is going to be get and create. And, uh, if you open the collection, you will see that you have a folder get. And similarly, I'm going to create another forwarder folder, which is going to be for our post requests and click create again. And now he if our collection inside of which we have our get requests and post a quick requests, we don't have any requests so far. But we have the folders and it's really useful toe organize your requests and toe make some advanced operations where you're going to hear from a lot of requests, and you just know which requests request is where and the basically you have everything in order. So it's really useful. And that was it for this lesson. I hope it was useful and you enjoyed it. Now let's continue with the next one. 6. How to Run Collections: Hello and welcome to this lesson where we're going to learn how to room a collection and how toe analyze the result. So, in order to do that, we need toe out another request here because we have only one so far. So we're going to go to this site once again. Requests. Ah, And if you don't remember, how did we get here? Just type in Google. Simple A p I request and click on the this link right here. The first link. And we get these simple requests from here. And we have already taken this request single user. So now we're going to get this one here. List users and the I'm going toe copy this year you l from here so GOP, and I'm going to paste it here. Delete the last slash, and after that, I'm going to get the endpoint off this request list users. So I'm going to copy this and based it here. And, uh, copy this whole think and put it in our post month. So we're going toe, create a new request. So click here. You request in our collection number one. So new request you can create like that or just from the arrow new request and the request name will be get. Ah. So what were we getting here? Least users. So we're going toe Call this request, get least off users and we're going toe save to a collection one and the here in the Ural. We're going toe paste the your your l that we have created and click sent. And the request is working because, as we can see, we have the response here in the body. And now we have two requests. And, uh oh, I forgot to tell you that it's really important to save your requests. I'm doing it with control and safe just every couple off seconds, as I'm speaking usually. But you can do it from here. Just save the request, and I'm going to save the other one as well. Okay, so So now if we want to run these two requests Ah, we can go here in our collection and click on the this arrow here, and you have this blue button run. So if we click this, we're going to have the collection runner opened. And from here, you can choose how many iterations your you want in which environment you want toe to run These we have only one environment so far. If you want to hear some delay between the requests toe local responses in the soul into all kinds of information. So we're going to create, for example, three iterations on these two requests. I'm going to select both of them. Ah, and, uh, I'm going to click run collection. And the as you can see, we have the two requests room three times it So each request, his have been run three times. So we have them once, twice, and three times it aeration won the duration to invigoration three. And we have the here the status kowtow feet request the time which took to request the in milliseconds and also the size of the request. We can close this and expand it if we want toe. And it's really useful information. We can export the results from here. Ah, but we're not I'm not going to that right now. You can run summary and the future by ah, the past requests, failed requests and both past and failed requests. You can go to the collection runner again and the run it again for example, but to reiterations, and you will have the requests around two times. Or, if you want it only one time. So I'm going to select one Inter it aeration Foreign collection one and only one iteration . And, um, it's really useful toe have this collection runner because it's summarizing older requests that you have, and you can see. Um, do you have something which is failing by filtering them? What is pacing with what kind of status coat? And basically everything is summarized Really nice. So this is how you run your collections, and I hope it was useful, but something that we need toe do. Just in the end of this tutorial, we're going to create a folder here that we're going toe put all our get requests in a folder in our collection. So click here on the Collection one and act folder and name it gets and just drag and drop our request inside of the folder. So now it's really pretty. If we click on our collection, we have our get requests in a folder, which is really summarized in in order, just like we did with the collection. Number two. We have folders we don't have, ah requests here, but inside of our collection one, we have a get folder with two requests. So that was it for this tutorial. Now, let's continue in the next one. 7. Variables in Postman: hello and welcome to this lesson. Today we're going to learn variables in post month and more specifically, what are variables? Why do we use them in postmen and how to create and refer variables? So what are variables? Variables are elements that hey, if a value off some type, that's it simple was it sounds, variables. Just they're just names or elements that have some value off a specific type. And why do we use variables? We use variables tow, Avoid repetition in our work. Let's say we have a big project and we have a value that we're using in multiple places and later on later on. We want to change this value. We're not going to go in every single place that we have this value and changed menu manually. We're just going to change. The value in the variable in is going to replace the value in all of the places where it's used. So basically we use variables, just tow, avoid repetition off our work and to store information in one place. Now let's jump in our postman to see how we can create and use variables now in our collection. One in the get folder. We have to get requests. And as you can see, the initial Ural is absolutely the same in both off the requests. So what we're going to do, we're going to create a variable, and we're going to store this your l as an information in the variable, and we're going to place it here in our requests. So how we can do this? First, you need to know that we can create very both on multiple levels. We can create variables. We can create global variables or environment variables. But right now, for this example, we're going to create a variable on the collection level. So these variable is going toe work only inside of this collection one. So click here on the three dots and click edit. So we're going to edit in the collection and in the variables. Let me first copy this this year, Hill. So copy and, um, click it again and click on variables and are variable name is going to be your help because this is the euro and the value. We're going to paste the Ural here. After that, this will be automatically filled up. So initial value and current value is the same click update. And now here is inside off our request. We're going to replace their in the euro here with our value with our variable. Sorry, because the value off the variable is the same. So delete this and how we can put our variable here. It's not just the name of the variable, Uriel. This is not going to work When we want to place our variable here, we need to set to curly braces. So, like this and inside of them, we put the name off our variable. So it's your it looked like this. You're ill. And make sure that after the variable, you have ah, a slash And after that the the end point of the a p I. So we're going to do the same with the the other request. Just delete the Ural name from here to curly brackets. You're ill and close the curly brackets. After that, you have the slash and the endpoint off the request. So let's see if our requests work like that. Click sent, and I have a response. So the everything is working just fine. Let's send the other requesting you have a response. So everything is perfect. Now let's save the requests. I'm doing it with control and s well the other way. Just click here on safe, okay? And the if you over right now, on the on our variable, it will show you what is the scope off this variable. So the name of the variable is your health. As you can see, you can see the value off the variable in the scope which is collection. Right now, this variable is used only in collection one, we can not use it in another every environment, for example. Now let me show you how you can sit a variable toe, a global level. So if we click here on manage environments on the top, right. And after that we click on Global's, we can set a variable here, which is going to be global for so for everything that we have in Postman. So, for example, if we say name is equal toe victor and click safe and after that, if you click here on the quick look, we're going to see the 2/2 a global variable. So go under Global's. We have variable name and the value off the variable is Victor. So if you have global variables, you can check them from here. So click on this guy right here. Quick, look. And the global variables variables will be stored here, and you can add them from here. Manage environments. Okay, so So now I want to show you something else if you click here on the postman console. So on the on the bottom left corner, you have this button right here, Post Mancuso. Or you can start it from view and Herschel Postman console. And every time when you run your requests, you're going to have a look share in the postman console. So let me show you what I mean. If I click sent on this request and I opened the console, I will have the requests right here. And if you want to see the value off a variable, you can check them right from from the postman console. So, as you can see, it's not saying right here. Your l slash ap I slash users, It's saying, Ah, http, are the name of the website and basically you can see the initial value off the variable. So if you want toe check the the the initial values off your variables. You can look like that from the post. Mancuso. Let's run the other request and the causal. You see that we have the two requests with the initial name off the values right here. So it's really easy. And ah, a nice way to check your looks and toe check. What is going on? If you care for a lot of variables and you don't know exactly which variable is referring to, what? Just the same the requesting you will see right here with the initial value off the variable. I hope this lesson was useful. So now let's continue with the next one. 8. Postman Scripting and Snippets: Hello and welcome to this lesson. Today we're going to learn so we can sit and get variables through scripting. And we already know what are variables and why do we use them? So let's jump into post month, and I I will show you some more interesting things. Click on the first request. And after that, on tests. So our first or second week A request? It doesn't matter. Actually, in click on test, we are going to write artists in this section, and we're going to use javascript for this. But you don't need to know any drug JavaScript for to be just creeped, developer. Just follow what I'm doing. So we're going to write consul dot Look, and we're going to print something on the consul. Basically, this command is doing this. It's printing on the console. And, uh, we're going to write, for example, Hello, world safe control and is just safe every every time after your you're doing some action. And, uh, we're going toe open our postman console from this bottom. And, uh, if we run the request right now, these lines off coat will be executed after their requests. So if we see the console right now. We will see our requests right here. Our get requests. And below we'll see. Hello, world Because we have said print on the console, This thing right here and the if you want to do some kind off actions here in this test section, you don't need to know any JavaScript at all. You can say, for example, P m dot variables gets in the give the value off your ah variable Here you're for exit, for example, or you can click on some of these scripts right here in the right side. These air cold snippets and snippets are basically line off coats that are. You just have a shortcut for a line of coat because if, as you can see from the from the name off, what from the from the cold that we put right here, This is going to get a variable. It's pretty self explanatory. And the if we search here in the snippets, you can see that we have get a variable bottom right here. And if we click this button, you see that the the same line off court is written for us. So you just have to replace the variable right here with our variable. And this right here. And this right here are exactly the same things. You don't need to know how to write the JavaScript coat. You have all the snippets here that you're going to need that already. You just click on one and it's the court is going to be written for you. Right here, for example, Sent a request. If you click right here, the court is going to be written for you. PM don't send requests and the their crest is right here. You don't need to know how toe right? The court. You just you have all the things you need right here. For example, if you want to verify that the status coat is 200 which means that everything is ok. The request was success successful. Just click on this. Ah, Slip it right shirt and the court will be executed for you. And this test is going to check if the status coat is 200 give the response. If the status coat is the response is 200. And it's really, really easy to use these snippets in your tests. Now let me show you how we can get the value off are variable. We're going to delete all of this and the this line of court right here PM variables get your l is getting the the value off are variable. So let's create a variable for this. So let's Curiel value is equal to this line of cold right here. Ah, just follow me. You don't need to understand everything from the beginning. I'm going to explain and we're We're just giving a value toe. This variable in the value is the the value off the Ural. And now, if you want to print these value after the request, we can say console dot look and your l value. And if we run this Ryker request right now and we check the console, this is the This is the requests that have been run. After that, we have the hello worth. And after that, we have the value off the variable, and we can see also, let's do it pretty here. So we can know what is exactly the value, and we're going to say the value off the euro is okay like that. And if we run the requests right now and we open the console. You'll see that it stays the value off the Ural. Is this right here? This is the veil. And every time after we run this request, we will hit. Let me clean this opening caf again. Every time after the request, we will have Ah, hello work and the value off the rural and is right right here. Right. This So it's pretty useful to have Ah snippets like this and toe put some something that is going to be run every time after the request request and it's going to be useful for you. Now if you want to sit a variable, we can basically the sin taxes the same, right. This right here. But instead of get, we're going to put sit here we're going to put name and the value of the name will be forced month, for example. And if you want to put this on the console, we can say console block PM variables get and we say name. And if we were in the request now we will see that we have the name right here. So the value of the euro and after that the name Now if we want to sit and get variables on a global level, just like we did in the previous Listen, we have put global variable right here, which is named Victor. And, um, if you want toe get this global variable, for example, we can type the coat PM Global's Get in the name of the variable or we can just click on the snippet right here. Get global variable, and it is going to write Write it for us. So pm Global's get and variable key is going Toby name. And, uh, we're going toe to set this in a variable. So let's global global name. It's equal to ah, to the name. And now we can put this on the console by sink. Consul, look the global name. If we run the request and check the postman console, we will see the name right here. So we have poor what we have done. We have created a variable global name and the value off this variable is the We're taking the global variable that we have given a value victor and we have put the variable this variable Ah, as a name. And after that we're printing the global name. So if we Jake here from the quick look, the global variable, the value is Victor. So the response that we're getting here is correct. And if we want toe get and sit variables on on environment level similarly Ah, we can Ah, right, the cold buyer by ourself. Or we can just click on the snippets right here, get from environment variable or sit on environment variable. It's exactly the same. Just we use the pm dot environments get and set and the I want to show something else. Instead of writing this this line off court right here in the tests, we can get this. So I'm going to copy this and goto our collection, click on the three dots and ate it. And we put this in the pre request scripts and update. I'm going to delete this from here. I'm going to save. And, um, let me clear the console. You'll see now that if I run this request, I'm going to have in the console old all of the information. All of the scripts are being executed because we have them right here in the pre request scripts. And as you can see, the values are before the request. So if you want to have them before and after the requests, we can leave them here in the tests as well. If I run this right now, let me clear. First, if I run this right now, I will have the villas before the request. Um, because we have them here in the pre requested scripts and to hear them also after the requests, because we have them here in the tests. So this is how you sit and get very both through script? Think I really hope that you understand everything, and it was useful for you. And let me just remind you that if you haven't already, please give me a review for this course. It's really important for me to have your feedback and your opinion. So if you haven't already, just leave me a quick review, and I really appreciate it. Now, let's continue with the next lesson. 9. How to create and manage Environments: Hello and welcome to this lesson. Today, we're going to learn worries environment, how to create and help to use environments. And, um, without wasting any time on the environment is ah, key value pair that we can use in our requests and the to show you what? I mean, we're going toe create a post request right now. So first, we're going to create another folder in our collection one, So click on three dots at folder and the folder name is going to the Post, and inside of these post further, we're going to put a post request. In order to do that, we're going toe our browser, and we're going to decide with the request that you already know and which post requests were going to get. We're going to get We're going to take this dispose request, register successful, So Ah, take the the Ural, as we already know, cope it. And after that, take the end point of the request. Put it right here. Okay. And co pedis on going toe. Create. Now, a post requests. So click on the new request and the the request. The name is goingto be registered user, and we're going to put it in collection one in the Post folder. So safe The Post and now inside of our post folder. We have the request, which we're going to click here and make it a post request. And we're going toe enter the euro here and what we have to do. Also, we have to take the body off the request. I'm I'm hoping this, and I'm going to put it here to Lochley. Conroe basted here. And if I sent the request right now, I'm getting this response missing email or user name. So what we're going to do right now is we will go into the headers, the request enter here. We're going to put a key content type, and the value is going to be application, Jason, and, uh, we're going to save the request. And if I run the request right now, I'm getting a token. So now, as we know, we may need to taste our ap ice on different environments and the by different environments , I mean that we may have different in points of different variables, and we want to test them in the different environments. And how do we create a different environment. We have a couple of options to do that by clicking here on manage environments. And I think a new one by ah, also, Clicky share on the new. And after that environment, I'm using this way, for example, and the environment is going toe have the name K. And so we have to put some variables. Usually we have to put on variables in this environment, for example, and points e mail and user name or password, and I'm going to add this. Okay, now, what you want to do is you want to give values to this to do these variables. So I'm going to take the endpoint off our requests, and I'm going to click on manage environments, click on create and going to give this value to the end point variable for the email I'm going to give I'm going toe give these value. So I'm coping this and, uh, I'm going again to manage environments, okay? And I'm sitting this value toe the email in them. I'm clicking update and for the password. I'm taking this very right here, and I'm going to put this, um, hearing the cure a environment for the password. I'm sitting this value as a, which is pistol and Update. And now I'm going to refer these variables here, so afraid the lead here, the end point and I put, um, put it is a variable in point and the here for the email. I'm going to put email and for a passwords, we're going to put these variable passwords that we have just created Now, as we have this request and we're referring the variables here, and, uh, if I run the request, we're not going to get the response that we're expecting because these variables are only working for the creative environment. So if we click your on the drop down and select the cure environment and sent the request, yes, we're getting the response and the this is what we're expecting. So our request is working as expected. Just make sure that in the in the curia environment you have all the the variable share and you have the value in the initial value and in the current value. So the initial value off the email in the current value should be the same. Ah, the same with the password. In the end point, make sure that you have all the values right here. And if we send the request, we're getting a response. We're getting a welcome and something else that I want to show you. If we click on manage environments, we have the option to duplicate the environment. And we can say that this environment is going to be state our staging environment, and we're just going to change the values, your soul. These are going to be these air, not correct values. I'm just, uh, putting a different values than the other environment until we're going toe update. Now we have to environment staging environment in the queue environment, and we we now we have the option toe taste our request in our AP ice on different environment environments, which is really useful by just clicking here on the drop down and changing them. And, uh, sometimes you need to check some in points in one environment in another environment, environment and variables. And it's really useful to know how to create how toe change environments. And also you have the option to delete the environment or to remove it from the workspace from here. And it's really, really useful. I hope this tutorial was useful for you. Now let's continue with the next lesson. 10. How to Create first TEST and use Snippets: Hello and welcome to this, lissome. Today we're going to learn what her tests in postman helped to create tastes at request level at folder level and a collection level. So what are tests in postman tastes? In Portman are a JavaScript coat that is executed after that after we receive the, um, the response from the server. So javascript coat that we that is executed after the response from the server. And now I'm going to show you how we can create these tests in Postman. Now what a collection level. If we go to these three dots and click edit, you can see that we have here pre requests, scripts and test scripts. So pre request scripts, these air the tests that they're going to be executed before the request. So if you want to change some some values dynamically from here. Ah, for example, if you want to change something in the headers, you're going toe toe. Put this here in the prayer request script is going to be executed before the request. And here in tests you want toe poor to put something that is going toe. Validate our response. For example, if we want to validate the status Court off the response. We're writing a test here, which is validating that, and this is utter collection level and the it's similar with the folder and with the requests tests. So if we click on the three dots on the folder right here we have the get folder, click on the three dots and edit. We have the pre request scripts and the test scripts. This is only for the folder right here. And similarly, if we click on a request, we have the prayer request scripts and the test scripts, which is only for this request right here. So we have the the tests on the collection level on the folder level and on the request level and on the request level. We're interested right now on the tests on this section right here and now we're going to create some very simple but very useful tests inside off. Theis. Request white right here. Get lists off users and the as we talked in the previous session, we have our snippets here on the right side. We don't need toe know how to write that the javascript coat we have the scripts automatically generated for us. So I'm going to select this snippet right here. That response time is less then 200 milliseconds, and basically it's self explanatory. It's verifying. Did there the response time? It's less than 200 we can change the name off the taste right here inside off these records . So I'm going toe. Say that this test is verifying that response time is less than 200. This is the message that we're going to get after the test is executed in the Let me see. I'm going toe. Give another tests. Right. Here's which is going to very fight. The status coat is 200. So let me separate them and going to change the name again. Verify that start of coat is 200. These air to very, very simple tests. But they're really useful. And if we run Ah, our requests Right now I can see that they have the response. And also I have test results here. And so if I click, I can see that both of them have passed so verified that the response time is less than 200 milliseconds and verified that start of court is 200 both of them have passed. Both of them are green and this is really, really useful. You can verify us all of these things that you have here that the, for example, started the successful post request response body convert the XML body to Jason object all kind off snippets which are generating on the scripts ready for you. And you can verify things. You put your tests here, you run the request and you get a really nice test result, which you can see. Um, are they passing or are they failing? And also, you can check this from the in collection ruler, for example, If I run collection one, I can see that I'm also I'm also having the the States right here. And it's really nice summary which is telling me if the request have passed and if all the tests from the request have passed so you can make really nice recommendation if you have to. Really nice summary if something is failing and so I think this will be really useful for you. Now let's continue with the next lesson. 11. How to Debug API Request: Hello and welcome to this lesson. Today we're going to learn how to de book on the postman console, how to read the information shown on the postman causo how to clear the locks and how to use the developer tools. So without wasting any time, let's go into our post month and the first thing that I want to do it's, ah, I want to change the team off our post months so we're going to get a little bit cooler and we're going toe feel like hackers. So click here on settings. After that settings and on themes, I'm going toe select the dark team. So if you want to change it dark, it's your your choice. It's just a personal preference. We were using the white team until now, but we're going to continue with the darker one. I think it's better for the ice, so just choose the one that fits for you. I think this one looks cooler, so we're going to stick with the dark one from now on. And, uh, now we're going toe de book our requests and how we can do this. You already know how we can start the postman console. It's from View and Show Postman Causal or from this button right here, postman console and, uh, let me make my screen on on duplicate mode so you can see the requests on the left side and the postman consul on the right. And if I sent the request, you can see on the Portman Causal that we have all the scripts executed before the request and after the request. So our scripts, the that were used before the requests are the pre request scripts, and the ones deter now executed after the request are the scripts in the test. If you want to go deeper into the request, you can expand the request and you'll see as a pretty format and or as a role for month the request. Heather's the response Headers in the response body. The row format. This is how the this request is sent to the server and the data right here. This is the response that were given in the If you click on the pretty four month, you can expand the request. Heather's it's it's more readable like this, the response headers and the response body. If we expand the data this is the date that were given as a response from the server. And here on the postman console, you can check Ah, your script that you have. You have bean writing here in the prayer request scripts and on the descript, and you can verify stuff here on the postman console. It's pretty useful from this bottom. We can clear the console and the we can send their requests again. If you want to. To have only one request here, I don't know to make it Macy and the Basically From here, you can check and verify your scripts if everything is OK, and something else that I want to show you is the developer tools and how you can use it. So if you click on view and the on developer and after that shoved show the tools, this screen will be opened. And here you can also the book and very fight your requests and for your scripts. As you can see, we have the we careful the scripts that we have bean writing, and this is really deep, the player off the building debugging and how you can verify your requests and responses. You can go to sources. And to see all the Where are all the data is starts. Ah, you can check the HTM mill. The CIA's says you can go to network performance memories. Security. Basically, the developer tools can be really, really useful for you. And I hope this was useful. And, uh, a t least you're going to know how. Toe open the deaf tools if you want to check something or from the console, Of course. So now let's continue with the next lesson. 12. Run Postman from the Command Line Using Newman: Hello and welcome to this lesson. Today we're going to learn how to run postman requests from common Flynt. And in order to do this, we need to install Newman. So what is Newman? Newman is a powerful, powerful, common flying collection runner for postmen, and it allows you to run and taste apartment collection directly from the common fine. And in order to install Newman, we need to install no Js first because Newman is a part off. No jays. So most probably you don't have no Jay's installed on your computer. But in order to check, this will go to the Common the Line and Howard Howard. I did that. Ah, I just enter cmd here and open the common prompt. And here we need to check if no Js is installed. So we're going to write this common. Ah, this ah note, uh, space that she v v stands for version. So after we click enter. If you have note installed on your computer, you you'll see the version here. But because I don't have it installed, I see note is not recognised. Um, and basically, I don't have it on my machine. And also, um, we're going to try NPM um Space Dash V and the most probably you see in PM is not recognised or installed on your computer computer. So the first thing that we do now we have to do now is to install note Js So we're going toe Google and we're typing in stole north Js and we're clicking on the first link and we're going to get the LTs version. Lt s stands for long term stable release and we're going to go with this and the you can stole for windows or ah, Marco is I'm using windows. I'm clicking here and note is being downloaded. So I'm going to open this and the installation. It's pretty simple. Just click next Accept the terms. Ah, this is the location where the no Jace is going to be installed. Click next and the NPM package manager is also being installed. So next and after a couple of seconds, no jays will be installed on our machine and after the installation Hey, finished, I'm going toe open the the cnd again and I'm going toe check give The note is installed, so I'm going to type note space that Chevy for a version and I have the current version on my machine. I'm also typing in PM space that Chevy and it's giving me the version off the NPM. So now we have it installed. Now, in order to install Newman, the command is NPM Install Dash G. Newman. So we're going to type here in PM stole Dash G. Newman, and it's going to take a couple of seconds. So we're waiting now. Okay, Now I have Newman is told on my machine. So the next think what we have to do is to export collection as Jason File and the in order to do that first, I'm going to create a folder on my desktop, which is going to be called Postman, And, uh, I'm going to export collection as adjacent file into this fold folder. So I'm going into our postman and on my collection one, I'm going to click the three dots and exports here in the export collection. You just click the recommended version. So we have collection one V one, V two and V 2.1. I'm going toe klik, the recommended version and export. And, uh, I'm going to give it ah, name off collection one Dr Jason and I'm going toe export this in the folder that I have just created on my desktop. So give me the name dot Jason safe. Okay. Your collection WAAS export ICS exported successfully. What I have to do now is on the c m d. I need to go to the location off the collection, Jason, file so and going to the folder, I am taking the path. The file. I'm coping it and in tow, the cnd I'm going to say CD space and dislocation. So right now we're in the postman folder, and the next thing that I have to do right now is to run the command Newman room the file off the collection or the name of the file dot Jason. So Newman room the collection file. Name that Jason. So I'm typing your month room in the collection file. Name is Collection one built Jason. Jason. Okay, um because the collection one that Jason is the our file. And when I pressed enter. Now you can see that we have the request and allowed the scripts right here in the command line. So our get single user first we kept the collection The name of the collection. After that, we have the first request. We have the pre scripts, the then the request. And after that all the tests. After that, we have the second requests. The second request. We have our tests and we can see if they have. If they're passed or failed, we can see the name off the test. Within. What? What? The taste is very frank. We're basically we see a nice summary. Ah, we we can can see the executed. So the best requests in the failed ones coming it orations, requests this scripts, request scripts and a certain assertions that we have. And basically, in our case, everything is passing. We don't We don't have far anything failing. We have the total room duration because we have the total data received the in ah kilobytes . We have having a average response time and basically all the information that we need now something else that they want to show you. First we're going toe clean. The the scene the soul seal is and the what you can do with Newman issue can say, Newman, you month run space Dash H and this is going to show you all the features and everything that you can do with Newman and you can do a lot of things with Newman were going toe to see later on in this tutorial what we can do. But with this command you can see all the options that you have, and this is how you run your postman requests from the common line with Newman. I hope this tutorial was useful. Now let's continue with the next one. 13. Learn Workspaces: Hello and welcome to this lesson. Today we're going to learn what is the workspace? How to create and manage workspaces Helder share collections in workspaces and help to remove a collection from a workspace. So the first question is, what is a workspace? And the the answer is a workspace. It's a place where you can organize your collections. So, simply put is just, ah, place where you can organize your collections and in postman ah, workspaces are available only after version 6.0, so you can check here in the help section menu. You can click check for updates, and if you have a version below six, you'll hear if you will not have the workspace feature available, so you need to update your postman. But if it's after six, for example, I have the latest version 7.2 point two, and you will have the workspace available. So if you click here in the top middle, you will see that there two types off works basis, a personal and a team workspace. A team workspace is only available in the postmen pro version, so we will be focused on the personal workspace. So what? I'm going to do right now is I'm going to create a new workspace which is going to be called taste workspace one, It's ah, personal workspace. The summary is optional and I'm going to click create workspace. Okay, Now I can see here the time on the piste workspace one, and I'm going to create a new collection which is collection one. And now I'm going to create another workspace which is going to be called this workspace toe click on personal and create workspace. And I'm going to create a collection which is going to be caught collection to Okay, now we have taste workspace one which have a collection one and works test workspace to which have collection and what you can do if you click here on the workspaces. And after that, if you click on all workspaces is going to open a browser and it's going toe. You will see your postman account and all of your workspaces, And from here you can manage your workspaces, for example, taste workspace one I can say at the workspace. And, uh, I will see uh, put this in tow. A test workspace to and the a select collection too. Up to this workspace and the cell. I successfully added collection. If I switched now toe test workspace one. I will see that they have both of the collections or collection one and collection too. And another thing that I want to show you is that if you click your on the browse on the bottom right corner and the up the workspace, you can also manage your workspaces from here and also from the three dots effect like them . And from here you can rename, edit the workspace or delete the workspace, and if actually cure on the built again, I'm going toe the workspace, and it's really easy to manage your workspaces and your collections like this. If I go to browse and upto workspace and, for example, if I want what, um, the collections from the taste workspace. One anti select all of my collections upto this workspace and they click built again. Then I will have all the collections, so collection one and collection toe. I have them into workspace, to If I go to work space one. I also have both of them collection one in collection toe and here from the three dots I can remove from this workspace. Only this collection if I want to. And, uh, if I want to delete, I can do it also from here. So this is how you create in you manage your workspaces and how you can move a collection toe. Another workspace. I hope this tutorial was useful. Now let's continue with the next one. 14. Run Collections using Collection URL: Hello and welcome to this lesson. Today we're going to learn how to run collections with collection your l and basically we need to divide this into two steps. The first step is to get the collection your l and the second step is to run the collection using Newman and the this tutorial is goingto be short and sweet and without losing any time, Let's go into postmen. And Ah, and in our collection Number one, we're going to click here on the arrow and after After that on the share and there is something called get link from here, we can get the link to our collection. So this is our link because I have taken the linger previously, So I'm going to update the link. Ah, maybe you'll see. Ah, you will not see the this euro in the beginning. So you need to press ah, get generate link or something like that. After that, you have this link. So I'm going to copy the link and I'm going toe ah to the Commons line where I'm going to type Newman room. And after that I'm going to give the link because you know that we previously he's told No Js inhuman in or you already know what numinous. So just type Newman run. And after that, give the link and press enter and you see the result. We have the requests here. We told the the pre scripts and all that all the test scripts after that. And you see the result. We have our collection runs in the Commons line. We have the requests we have for the scripts. We have the verifications and we can the we can just run the collection with Newman in our comment line using the collection. Ural again taking the collection euro from here. Get link. Just take this link. Put it in tow. The common prompt with the command. Your mom room. Oops, no more room. And the link after that. That's how you run your collection with the collection Ural in Newman. And that was it. I hope that you enjoyed this tutorial. And I want to quickly remind you that if you haven't already, please give me a review for this course. It's really important for me. And thank you so much for watching. Now, let's continue with the next lesson. 15. How to Run SOAP Requests in POSTMAN: hello and welcome to this lesson. Today we're going to learn how to run soap requests in post month and we have two steps. The 1st 1 is how toe up soap requests in Postman in the 2nd 1 is Scout run and validates the request. So let's goto our postman right now and ah, create another workspace. So we're going toe workspaces and create new and the name is goingto be soap. So give it a name, click on personal and create workspace And now we are inside of this soap workspace and we need to create another A collection because we don't have any. So click on new into collection and we're going to call this so collection and click create . And now we have this soap collection without any requests. Now what we're going to do, we're going to goto our browser and just full of what I'm doing here type country in four W is the L. If you don't know what Ws deal is, this is a Web services description language which is used in soap and what we need to take here. After we click on the first link, we're going to take this your L U l So I'm coping this and then going into both month. So I'm going to click here for a new request and I'm going to paste the you Ariel here. After that, we need to go to the body off the request, click on the road and on this text, we need to select Text XML. After that, if you go to the hitters, you'll see that a new heather is select with created, which is a content content type, and the value is fixed exam ill so we can manually type the content type here with the value off text slash ex mill, Or we can create it just like we did from here from the body click row and we select the text and ex mill from here. Um, it's the same. Think the next thing that we have to do is we need to provide budeiri for our request and how we're going to do this. So basically, we have to generate a soap requests from R. W s deal and how we can do this. We can do it with with a tool like soap you I or we can do it with some kind off chrome extension to that we're going to use for this example. So I'm going to open a new top and click on APS, and I'm going to the Web store where we're going. Toe search for Whistler, Something called Whistler and the Whistler. Ah, I have already installed. So if you don't have it, just click hearing stole and we're going to use these two parts are double raise deal and in tow soap ap I requests. So after you install this, you should have, um, this icon right here which, if you over it, it will say Browse ws deal. So open your w is deal you're ill and click here and you'll see all the soap requests that are available in in these ws deal document and we're going to get for example, the 1st 1 is Capital City. So if we click here, we will get the body off the request which were going toe copy and we're going toe based in tow. The body off our postman and very important here into the metal. We should ah change this proposed and here where it is drink, we need to put ah country court for example, I live in Bulgaria, so I'm going to put BG. This is the country code for my country. You can put the any country court here and I'm going to send the request. And as you can see, it's working. We have a response which is telling me that the capital city is Sophia. This is the capital for Bulgaria. If we put here, for example, USA and we press sent, it's going toe toe intern Washington because this is the capital. If we put here, I m for India, for example and we send it. We're going to get a new deal, he and you get the point. So now we're going to save our requests in south of the inside of the soap collection. And the name is going to be Capital City, for example, and safety soap soap collection. And now, of course, we can add tests to our to our soap request. For example, if you want to verified that Ah, let's see that the start of court is 200 we're going to use the snippets and we sent the request right now and you can see that it's past the status code is 200 the test result. It's one off one past. We can see the body and the everything is working perfectly with this soap request. And we can also run this request. Ah, with Newman, as we already know from the previous lessons. If we create a click on the arrow and share and get link and we copy this link Ah, we're going toe are common find and we say Neumann room and give this collection UL is going to run the request and we can verify our requests from the common line with human as well. I hope this tutorial was useful for you. Now let's continue with the next one. 16. How to Chain API Requests: Hello and welcome to this lissome. Today we're going to learn how to change a PR requests or, in other words, how to get data from a response off on a P I request and refer it into another AP I request . And in order to do this, we're going toe post month and we're going to create first another workspace. So create new. We're going toe to say that this is ah, Jane a p. I click on personal and create workspace. Now we're going to create a collection. So I'm clicking new and after that collection and we're going to say that the name of this collection is going to be a P I chaining and we're going to create this collection and the inside of the collection. We want to create a get request, but the in orderto get their quest. First, we need to go into the website that we're getting requests from. If you don't remember how we get here, you go to Google and type simple AP I requests and the click on the first think most probably is going to be the first link. This R E Q. R. E s website and we're going to toe get this request right here. Lists off users. So I'm taking the Ural off the website. I'm basting it here after that time taking the request endpoint and my basting it. I'm taking the whole thing and I'm going toe compete in tow. The postman. Now we're going to create new requests. Request Name is going to be Get the least off users and we're going to save it in tow. Ap I chaining collection. So now we have the request here in tow AP Chaining collection and we're going toe based the you're l with the end point of the request and the phe called to is going to be automatically field here. And if we sent the request right now, we're going to receive this as a response. And as we can see there three users first user with tidy four second user with I d five and third user with I d six. Now, the next thing that we want to do is we want to get another request. Eso we're going toe the website again and we're going toe get a put request, which is which is going to update user. So this put requests, which is called Update and, uh, take the girl again, Paste it, take the end point of the request and based it. Now, take the whole thing and into our postman. We're going to create a new request. So click a new request and the this ah request is going to be called update and it's going in a p I chaining so safe to a Ph Inc. And we're going toe click on the metal type is we're going to select put, and we're going toe based the your aerial here. Next thing, we have to take the body from the website and put it here in tow. The postman in tow, our body click role and select from the text Jason Application, Jason and click sent. And, uh, we're getting a response. So everything is working as expected. Actually, let's ah, rename this to update user. So what we want to do right now is we have two requests get request, which is getting a list of users and the put request, which is updating a user. And, uh, if I want o get ah value from here from our get get requests, for example, if I want to take it for Paris or a Tracy, and I want to put it here into our of the eight user in the Morphosis name. First thing that have to do is I have to create variables, so I'm going to create a new environment right now, I'm going to click New and Environment, and I'm going toe say that it's going to be named a P I Chain Inc environment. Let's call the tape by changing variables, actually, and let me put your user name one with a value off Neil Neil, for example, and I'm going to click at. And now we have this variable user name one, which is he has a value neo. And if I want to put it here to the place off Morpheus. So we're going to the body and we double curly brackets. We're seeing, uh, user name one, and we're closing the curly brackets. And very important think we have to select the environment from here. So AP I chaining variables and we run the request and we're getting a response new in the name now what we have to do is we need to write scripts, which are going to fetch the data from our first A p I, and they're going toe update the data into our second AP. I So the in the first request get list diffusers. If we go toe tastes, I'm going to right here. Body data equal to Jason dot farce response body and also value is equal to boldly data dot And now we have to give the the path the Jason pet toe a particular value that we want to fetch and how we're going to do this. I'm going to show in a second, but first, Ah, I just want to remind you that these scripts are going to be executed after we get the response. So, uh, let's go to our browser and the type into Google, Jason, but finder and click here on the first link. And this is ah, application, which is giving the a path toe specific. Jason object. So now we're getting the body off our response and coping thes so copy and paste it here into the Jason Pathfinder and a so you can see is giving us everything that we need Difficult Conde data. And we have the zero, the one in the two. These are the indexes. So basically, these air, our users that we have both month one is if the other one is Charles and the other one is Tracy. For example, if you want to take Tracy, it's going to be this one here in tow. We're going to click on the first name off, Tracy, and this is going to be the pet that we need. So copy this one. So now we're going to give this Jason pat here, So value is equal toe body data dot in the Jason pat. And after that, I want toe print this on the console for console the look value. Actually, we don't need this X. So body data that data to first name and were fetching the, um, the name Tracy. So we're fetching this this line, the first name with value, Tracy. And we're going to print the value after that. So in order to see if it if everything is correct, we're going to run the postman console, and I'm going to send the request right now. And if I opened the postman console, you can see that after the request, I get Tracy. So it. It's fetching the Jason data just like we want it. So now what I want to do is I want to sit. This is an environment variable. So I I'm just going to use the snippet. So I clicked on, sit on the environment variable here and are variable key is going to be our user name one variable, which is new. So I'm clicking here and the has a value. I want to use these value. So I'm pasting it here Me safe. And similarly, if I want to fetch another name from here, for example, if I'm going to change this Jason but instead off too. So this is zero. This is one and this is too. So I want to take if I'm going to say here Data zero, that first name I'm going to save and the if I send the request now you will see that now the value here is if and if we open the postman console you'll see that after the last Ah, off the last time after the request request was executed, we get the response. If so, this is how you fetch data from one AP I toe another ap I requests. I hope it was useful for you. And I was here in the next video 17. Thank You!: congratulations for finishing my postman course for testing ap ice. I Thank you so much for being my student, and I really appreciate you for watching all of my stations and in finishing the whole course. Thank you so much for being here and for being my student. And please leave me review for this course. It's really important for me. I hope that you get the value that you came here for. And now you can use postmen and distressed ap I requests. Thank you so much for being here. I really appreciate us, my student, and I hope to see you in my next courses.