Full transcript
0:02right so today we are going to see uh what is Postman and then we will see
0:08what are the different features are available in Postman and after that
0:11we will see how we can download and install Postman tool and then we will play uh some
0:17important features in Postman tool okay so first of all let us see uh what is Postman
0:24so Postman is an API testing tool okay a postman is APA testing tool and what kind of testing we
0:32can do by using Postman we can do manual testing right so we can do manual testing of apis using
0:43Postman okay so we can do manual testing of API using Postman but recently they have also
0:50implemented some development related features so nowadays the developers also started using Postman
0:56tool to create eBay documentation like whatever the apis they have developed so if they want to
1:02create any APA kind of documentation they also are trying to use Postman tool okay and which
1:09is very very popular tool and by which we can test apis and not only rest apis we can also test soap
1:16related apis in the last class we have discussed two types of apis rest apis and soap apis or we
1:23can say rest services and soap services and both are supported in Postman both are supported in
1:29Postman okay so first of all let us see how we can download Postman tool and then we will start with
1:36that so post money is available into do things like we can have desktop version or we can also
1:43have web version so Postman tool is supported both desktop and web version so we can use any
1:49one of them and both are having same kind of UI same kind of options you don't see any difference
1:56between desktop version and web version but the only thing is if you have a desktop version you
2:02can just download and install it which will be there permanently and if it is a web version you
2:07have to access the postman through URL okay every time you have to open the URL through browser then
2:12you will able to access the postman and both of both the things will work on the same place like
2:17we have we will create only same workspace for desktop and web and same thing will be shared
2:23if you do something in the desktop version which will automatically reflected in web version and
2:29if you do something in the web version that will also automatically reflected in desktop version
2:33so both works in the similar way but the way of accessing those applications will be different
2:38okay so first we will start with the desktop version we will try to download desktop version
2:44and see what are the options are available later I will also show you web version okay so to do this
2:50first of all you need to have a Gmail account because the postman internally use your Gmail
2:55account to access your Postman features and so on even if you want to download you need to create an
3:01account in Postman and that account you can create through your Gmail account or through your Gmail
3:07ID that's a prerequisite okay now we'll see how we can download Postman tool and how we can install
3:14so first of all let's go to their official website and go to Google and search for download Postman
3:22and this is their official website okay download Postman get started for free you can just click on
3:28it and the postman is a free tool and we can just easily download I can install right so if you are
3:36working on Windows you can directly download this one so windows 64 bit and if you are downloading
3:42on Mac machine you have to download separate software you can just look for download Postman
3:48for Mac you can search for it and then you will able to get the postman for Mac operating system
3:55so this is for Windows and if I just come down here you can see Intel Japan Apple chip you need
4:01to select this apple one and then you will able to download the installer and once you download
4:06the installer so the way of installation is exactly the same there is no difference okay so
4:12you can just download from here so once you've downloaded you will get one executable file
4:17okay so you will get an executable file uh I'll show you step by step installation and the guests
4:23can follow the same process then you will able to see the postman tool and I already installed
4:28my postman on your on my machine so I have just made a small document just two to three pages
4:33of document with screen charts and go through the document and install your postman on your machine
4:39now let me just go through the steps how we can install the postman so first we need to go to this
4:44link and click on this link which will download the postman uh desktop version application and
4:50before downloading uh it will ask you your Gmail account because which way that is a prerequisite
4:57it will use your Gmail account so once you click on this Windows 64-bit button so then you will
5:03get one installer like this small icon this is your installer and which is an executable file
5:08and if you are working on Mac you will get a DMG file and once you double click on this file then
5:14it will start installing your Postman tool then you will get this screen and here there are two
5:18options are available one is create a free account and sign in so if you are if you already have a
5:25account with the postman previously if you already sign in then you can use sign in or else we need
5:30to create a free account we need first time we have to use First Option create free account
5:35and once you click on create free account then it will go to the next screen like this and here
5:41we can log into the postman by using your Gmail account okay sign up with Google or
5:48where we can use Gmail account or if you want to create a new account with the postman you
5:53can just provide your email pass username and password and then click on create free account
5:59so here uh you can just look at here I have provided my details here instead of going with
6:05the Google account and I have provided the details here and if you want to use you can
6:10directly click on sign up with Google and it will use same Google or Gmail account and you
6:15can provide all the details here so your email username and password but you have to remember
6:20this because later if you want to use Postman it will ask you for the login so whenever you
6:25want to log into the postman you have to provide these details and please carefully remember them
6:31and once you create a free account and then it will directly open your post menu like this okay
6:38so which will because through we have gone through this process through installer so initially we got
6:43an install right so once you click on it then this process will start and once you started
6:48then uh you will see the screen like this this is the first screen you can see on your post mental
6:56okay so this is your first screen you can see in your post menu that's it so once you have done it
7:01your Postman tool installation is ready and this is your desktop version so you can have permanent
7:07line information and whenever you want to use it you can still use it later I will show you
7:12how to work with the web version which is exactly the same no change in the UI or anything so this
7:18is a desk desktop version of installation of Postman so once you install your Postman tool
7:23and then you will see a small icon like this on your desktop so this is your Postman launching a
7:31shortcut and once you click on this then it will open the postman tool I will share this document
7:38later so you guys can go through each and every screen and just try to install on your system
7:43okay so this is your Postman uh screen the first time when you open your Postman you can see a
7:49different type of options here so you can see in the left side collections apis environment
7:55mock servers monitors and so on and you can see different menu options also home workspaces API
8:02Network explore and there are so many other options also uh displayed here I'll go through
8:07these options uh slowly one by one and uh the main thing is the first and most important thing
8:13as soon as you started your work Postman tool the first thing is we need to create a workspace
8:18we need to create a workspace so let's try to understand what is a workspace
8:24these are most important thing okay first time only once you can create a workspace you can
8:29create any number of workspaces but initially we will start creating one workspace and what is a
8:34workspace workspace is basically an area where we maintain we maintain files okay files in the
8:43sense all the test cases request everything we will maintain in the workspace so whatever
8:48the task we do in the postman everything will be saved inside the workspace only
8:54okay files and saved there and saved we will area where we maintain all the files and save
9:00so whatever task you do in the postman everything will be saved in the workspace and where exactly
9:06this workspace will be created this workspace will be created in the Google itself so because when
9:12you're using your Postman tool right so beginning we provided our Gmail information right by using
9:18that information Postman will automatically create uh for some some space to you where you can
9:26maintain all the files that is basically called as a workspace so workspace is basically an area
9:32where you can save all your information all your test cases your request type test data everything
9:39you will able to save inside the workspace okay so that's the meaning of workspace so first time when
9:45you login into your Postman you have to first create a workspace and then only we will able
9:50to do other things so we need to understand some important technology in the postman so
9:56I'll go through them one by one so first let us start with the workspace so what is a workspace
10:00workspace is an area where we can maintain all your files all your test cases everything
10:06whatever the task we do in the postman everything will be saved in the automatically saved in the
10:10workspace and this workspace will be created by the postman by using your Gmail account okay
10:18now let us see some operations on the workspace how we can create a workspace or suppose if you
10:24want to modify the workspace how we can modify or if you want to delete the workspace how we can
10:28delete the workspace so let us try to do some basic operations first okay so if you want to
10:34create a new workspace okay so what we can do is here there is an option called my workspace and
10:41currently already I'm already using some workspace that is the name of the workspace is my workspace
10:47so I just want to delete this and then I will create my own new workspace and what I can do
10:52is if you just want to delete this you can just select this workspace click on the workspace name
10:57and here you can see workspace settings and here can click on the delete workspace and
11:04here you need to give workspace name this is just for deleting existing one
11:10my workspace I'm just giving my workspace name here and then I click on the delete workspace
11:18I think this is same name we have to provide whatever name we have given to the workspace
11:22and then we can just click on the delete and it will automatically delete it my workspace now
11:27first time when you launching your Postman this is the screen you will see this is a home screen
11:31okay you will not see any APS or nothing so now we need to create a new workspace how to create
11:38a new workspace create a new workspace I will show you practically and later I will provide you each
11:48and every step screenshots and you can practice it create a new workspace how to create a new
11:54workspace so to create a new workspace uh this is a home screen right here here you can create so
12:01to create a new workspace is what you can do you can just directly go to workspaces option here and
12:06here there is an option called create workspace okay create workspace you have to click on this so
12:13click on the create workspace now here it will ask you the name of the workspace and then you have to
12:19provide some summary and other details so here I'm giving my workspace name is I can say my workspace
12:29okay my workspace this is the name of the workspace I'm giving and then if you want
12:33to give some summary you can just give it or else you can leave empty now there are four types of
12:39visibility types personal private team and public four types of visibility options we have personal
12:46means what whatever the apis or test cases requests you created under the workspace you will
12:52able to see them you will have complete access but nobody can access them so that's called completely
13:00personal workspace your own personal and private is also same only invited team members can access
13:07so what is the difference between personal and private means personal means you only can access
13:12whereas when you select the private you and you can also invite others in team members and they
13:18can also access and a team is nothing but all team members can by default access but here you have
13:24to add your team members also so that the same workspace will be used by the team and most of
13:30the times in the real-time companies uh you will use a team option because the same workspace will
13:35be shared between the teams and then public means what your workspace anybody can see anybody can
13:41import anybody can do anything on your workspace that is all about public so there are multiple
13:47options are available so for now let me just take the personal and then click on create workspace so
13:54once you've created this this will create a new workspace you can see here here it will display
13:59the new workspace option here so currently you are pointed to workspace your own workspace
14:08okay so this is how you have to create a workspace and if you want to rename it or
14:14if you want to edit you can do it suppose you can just click on here and it will allow you to change
14:19change the name of the workspace you can rename it okay suppose if you want to create another
14:24workspace again here you can just click on the new option and uh you can see there are multiple
14:30things will be shown whatever you want to create under the collect under the workspace all the
14:35options are available and if you want to create workspace yourself you can select this option
14:40create a workspace to build independently or in collaboration you can create your own workspace
14:45so these are all called different components in Postman so HTTP request a collection API
14:52document API okay environment mock server monitor workspace there are different components are there
14:59in the postman so later we will try to understand all these things but for now just let us try to
15:03understand about the workspace okay so workspace we can create so workspace in the workspace is
15:09the first the basic entity in the postman without workspace we cannot do any other things first we
15:15need to have a workspace and then only we will continue the rest of the task okay so the first
15:20basic level entity is workspace we need to start with the workspace so we created our own workspace
15:27and if you want to rename it you can just click on here and you can just rename it okay so this
15:33is a way of creating the new workspace and once you've created your workspace the next thing is
15:41what we can start working with the postman options we can start working with the postman options and
15:48the next most important entry is collection okay collection so what is a collection so we
15:57have seen how to create workspace as a first option what you have seen create a workspace
16:04and then we have seen how to rename and also how to delete workspace so these are the common
16:12operations we do creating new workspace renaming it and deleting it so these are the options we
16:18have seen so we have just created if you want to rename it you can just rename it like as a
16:22my workspace One automatically it is renamed and if you want to delete this workspace you can just
16:27select the workspace here and here you can see workspace settings click on the workspace settings
16:32and here uh sorry click on the delete workspace which will automatically deleted your workspace
16:39again if you want to rename just select this workspace one and you can just rename it again
16:45automatically everything will be done so these are the workspace operations creation renaming
16:52and deleting and this is the first thing which we have to do once you start working with the postman
16:57and the next thing is what a creating collection okay creating collection so what is a collection
17:05is nothing but uh a folder where we can store all the test cases and different type of HTTP
17:13requests everything we will able to save under collection so inside one workspace we can create
17:20en number of collections n number of collections because sometimes you have different type of test
17:27cases different type of request and we can group them into multiple folders or we can
17:33group them so to maintain those groups we will create a collection simply remember collection
17:38is a folder which contains number of requests okay collection is collection or you can say collection
17:48contains a number of number of folders and HTTP requests this is the definition so collection is
17:59nothing but what a collection contains a number of folders We can create number of folders inside
18:04the collection and HTTP requests different type of HTTP request we can create under collection again
18:11under collection we can do multiple operations like we can create a new collection we can
18:17rename a collection we can delete the collection okay and uh sometimes if the collection contains
18:25so many requests or so many test cases if you want to run all the test cases simply we will
18:31run the collection okay we simply we will run the collection so we can also run the collection you
18:37can also run the collection so multiple operations we can do on the collection so under workspace we
18:44can create in any number of collections okay we can create any number of collections under
18:53workspace under workspace we can create any number of collections under workspace what is
19:02the collection collection means which contains a subfolders and again number of requests and
19:08number of requests we can create in the subfolders also folders are options if you want to create we
19:13can create or else we can directly create the request under the collection now this is second
19:19important entity in the workspace so without creating collection we cannot create any test
19:27cases we cannot create any HTTP request what are the HTTP requests in the last class we discussed
19:33so what are the rest apis what what are the different operations we can do Post get delete and
19:40put so these are four are called HTTP requests so whenever you do whenever you test the apis we have
19:47to send the HTTP request so to save those requests or to uh to execute those type of requests we need
19:55a collection so what is a hierarchy now first we need to create a workspace the workspace
20:01internally contains n number of collections we can create our own collections again each collection
20:06printing is a number of folders and HTTP requests and what are the different operations we can do on
20:13the collection we can create a new collection we can rename it we can delete it and sometimes we
20:19can directly run the collection when you run the collection when you execute your collection what
20:24happens whatever HTTP request we created under the collection automatically will be executed
20:31okay so that is the use of collection now let us see how we can create a new collection how we can
20:38rename how we can delete and how we can create a different type of HTTP request under collection
20:44and how we can run the collection we will see one by one so now let's go to postman once again
20:51so we just created a new workspace right so now let us create a collection so how to create a
20:57collection many options are available so you can just create here this option you
21:02can directly use or else you can directly go to the uh you can directly go to the file
21:10I can just go to the file here and you'll click on the new Option and then it will
21:15show you uh different options here let me just go to the okay let's go to the file
21:23and new and once you click on the new then it will show you all the postman components
21:34okay first of all we need to go to the workspace right so I have come out from the workspace so we
21:38need to go to workspaces and select your workspace whichever you want to use so now currently you are
21:43in the workspace and then you need to go to the file new and then you can see the options here
21:49okay before accessing all these options first we need to go to the workspace and then only you will
21:54able to see here so how to create a collection the first option is what you can create like this
22:00create collection I'm using this option click on the collection and then automatically here
22:06it is created new collection the default name is new collection if you want to give any name
22:12you can just give it here I say my collection one my collection one and then automatically it
22:19is created here this is one collection and if you want to create another collection simply what you
22:24can do here you can say this option you can use or you can use file new Option or you can use this
22:30plus option multiple options are there okay so you can use this button when I click on the new here
22:36it will show you the collection option here you can select it or you can go to file new and you
22:43will get the same thing or you can directly click on the plus button here create a new collection
22:48which will automatically create a connection here collection here directly it will create
22:52so here I can give my collection two okay like this you can create one more type of collection
23:01suppose if you want to go to the through file menu you can just go to the file new and here
23:07also you can select the collection once you select the collection then it will automatically
23:11add it here then you can just change the name of the collection here I'll say my collection
23:16three so like this you can create any number of collections so one workspace can have any number
23:24of collections so what is collection contains a collection contains a HTTP request and we can
23:31create subfolders and also we can create multiple hdb requests that is the meaning of collection
23:36so we have seen how to create a collection but how to rename a collection if you want to just
23:42rename it what you can do we can just select one of the collection here and if you want to rename
23:48it you can just click on the three dots here and once you click on this three dots and you
23:53can see so many options here and these are the different things we can do on the collection so
23:59you can select the rename option here and then you can rename it so you can directly rename it
24:05so like this you can rename the collection suppose I want to delete the collection so what you can
24:10do is again click on these three dots and you can find the delete option here just click on
24:16the delete and confirm and collection will be deleted similarly I am trying to delete
24:23collection suppose I want to create another collection like duplicate collection I want to
24:29create let's say this collection is having some content so I want to create another collection
24:33with the same type same collection like whatever the request we created inside the collection the
24:39same collection I just want to duplicate or I want to just copy it so then what you can do
24:45is we can just click on the three dots again so all the collection related operations we
24:49can do by clicking on Three Dots and here you can see uh different options are there
24:55and you can just look at here duplicator if I just click on the duplicate same collection is created
25:02with a duplicate copy so whatever the request we already have in this collection same request
25:08will be part of the duplicate collection also so like this we can also duplicate the collection and
25:14suppose if you want to uh export this collection or if you want to save this collection as a file
25:20then you can do export also you can just go and Export here you can just click on the export and
25:27select the option here recommended version and then click on the export and that a collection
25:32will be saved as a DOT Json file and later you can import that file in the postman also later
25:38if you want to import that file in the postman you can still import it so we will discuss these
25:43options in the coming sessions how we can export and import how we can save the collection between
25:48the members so these options again we will see later so these are the very basic option
25:52operations which we can do on the collection creation of new collection renaming deleting
25:59and run the collection so when you were able to run the collection if you have some HTTP request
26:04inside the collection then we will able to run the collection okay so I'll show you this option once
26:11you created multiple HTTP requests okay now let us delete this collection for now I'm just deleting
26:18and then I will create one more collection so let's create one more collection here so you can
26:23find many options guys so here you can see this is option here this is option here it is option
26:28or else you can just go to file new so if you want to do one task there are multiple options
26:34are available in Postman you can use any of the option okay so now I'm creating another collection
26:40simply you can say create collection and here I will give one collection name I say my collection
26:49my collection so this is a collection name so I can say present uh press outside somewhere
26:57in the postman then it is automatically created in your collection okay so I'm just closing the steps
27:03not required so now I created a new collection this is my new collection so once you created
27:10a collection so what is the next thing we do is we will able to create a request and that is the
27:17most important thing okay we will able to create a request what is a request what is a HTTP request
27:23whenever you want to test an API let's say I have one API and if you want to test this API
27:31okay so we have to send a request we have to send some requests to the API
27:37to the API and the API will receive the request and what API will do Now API will provide the
27:44response APA will provide the response so request and response these are the two important thing
27:52which we need to know so to test the API first we need to send a request to the API then API
27:59will fetch the data from the database and provide the response to the user so as an input we have
28:07to pass a request as an output we will get the response and where exactly we do validations we do
28:13validations on response we do lot of validations on the response like status line status code
28:20and the response body Hector so cookies so many things we have to test as part of the
28:27response but if you want to do all these things first of all we have to send a request to the
28:33API then APA will send the response to the user so what kind of request we can send to the API
28:41rest AP will support we be able to send get request and we will able to send post request and
28:48we will able to send put requests and finally we will able to send delete requests so these are the
28:53four types of HTTP request we can send to the API and these requests we can create under collection
29:03that's what I said right collection contains the number of folders subfolders inside the
29:07folders also you can create HTTP request or you can directly create HTTP requests inside the
29:12collection itself so what kind of request we can create different type of requests or get request
29:18post post daily these type of requests but what is the purpose of sending this request to the
29:23API what get request will do it will retrieve the resource okay it will retrieve the resource
29:33resource from server or we can say from database okay it will retrieve the data
29:40so when you send get request eapi will fetch the data and provide the result and what is a
29:47post request means which will create a new resource or create a resource on database
29:56or you can say database here instead of server we call as a database so get request will try to
30:04retrieve the data or try to Resource is nothing but what the last class we discussed what is the
30:09resource resource is some functionality or some data which we can retrieve from the database okay
30:15that's called resource so whenever you do some request that is depends on the resource on it so
30:21when you say get request we will able to get some resource from the database server or when you send
30:27post request we will able to create a new resource on the database and when you send put request we
30:35will able to update resource or we can update existing resource on the database on database
30:45we can update existing resource on the database when you send the delete request that will delete
30:51existing resource from database existing resource from database so these are the
30:57four different type of requests we will send uh through API okay get request post request
31:05put request and delete request so these four are called as HTTP requests okay so these
31:12four are called as a HTTP request get request post request put request and delete request
31:20okay so there is one more type of request is also there called patch requester passed
31:27and very rarely we use this request pass and put these two things work a similar way but a
31:36small difference is there let me tell you patch so what is a patch is nothing but suppose when
31:41you say put here which will update the complete resource suppose I want to update some partial
31:48uh partial resource I don't want to update the complete thing I just want to update some piece
31:54of resource then we can go with the patch so this will update this is also for updating updating
32:01partial details of resources that's a simple thing so for example I have posted some employee
32:10data so for example I have amp ID okay EMP ID is there and EMP name and EMP salary EMP designation
32:20okay so these are the details I have posted to my database through post request okay so after
32:26that uh if I want to update this okay if you want to update this entire data like including
32:32name salary designate everything I want to update then I have to send put request suppose I want to
32:38update just a salary or I want to update just a designation then you can send watch request okay
32:44so that is a basic difference between put request and a patch request but most of the times we don't
32:50prefer to use batch request if you try to update any record we will try to completely update by
32:56sending a put request itself so both works in the similar way the only the difference is what
33:01in the in the put request we will try to update the entire resource but in the patch request we
33:07will try to update a partial or some portion of the data or portion of the resource that is
33:14a basic difference between put request and Patch request okay so now let us see how we can create
33:21these HTTP requests under the collection so for what we have understood we have understood what
33:28is workspace how to create a workspace and what is a collection how to create a collection so
33:35now we are going to create different type of HTTP request and then we will try to run the request we
33:42will try to send a request and we will see what kind of response we will get and what are the
33:48things will be part of your response okay so for that I am just taking one sample API here
33:57foreign okay so I'm just taking some sample API so if I just go to the website just a second
34:10okay so we have some sample API so request and response dot in so they have provided some demo
34:19apis initially we will just work with them and later I will introduce you some real time apis
34:24so if I just go to this page and here you can they provide us some sample apis here there are
34:30so many types of demo apis they have provided and not only EPA request they have also provided what
34:37kind of risk request we have to send what kind of response we will get everything we will able
34:42to test here itself directly we can send get request Port request Port patch everything we
34:48will able to send from here and corresponding request will be sent Response Code and response
34:54body everything will able to get it here but this is not the right way to test the apis so
35:00can we test apis directly through browser will able to extract the response we are able to send
35:07the API request through browser but we should not use browser for testing we cannot test the
35:12apis through browser but especially some type of request we can send through browser we will able
35:17to get the response on the browser itself but we cannot do any type of testing on the browser
35:23related response so we need some tool so only in the tool we can do we can test a different
35:28type of validations we can apply so let us try to test these apis or let us try to First send
35:35the AP request so we will do validations later so we'll discuss how we can perform different type of
35:40validation that will be the next part but first of all let us see how we can send different type
35:45of HTTP request inside the collection okay so now based on this document they provided have created
35:53few test cases API test cases let me share a small document here so this is how we need to have all
36:01the tests APA test every request we will consider as one test okay so for example here I have taken
36:08mainly four type of requests get a post put and delete so these API requests have taken
36:14from this website itself but I have just created a Excel sheet format so this is the entry point
36:21so let us try to understand this so these are the different request type which we are going to send
36:28and whenever you send a request we have to specify the URI uniform resource
36:34identifier okay resource identifier so again which contains multiple parts that we need to understand
36:41this okay so the Ura contains in multiple parts so what are the parts which we need to understand
36:47so let me take one URI and let me then explain what exactly this URI contains
36:55okay so let us try to understand this one so here
36:59this is completely we can call it as a uniform resource identifier so which
37:04is which contains multiple things guys so what are these URI contains if we just look at here
37:11so this part from here to here so this part is called as a host or we can say domain host or
37:19domain okay till here.com dot in dot edu.org you can see right this name in the websites so
37:27this part is called host or domain and uh this slash APA slash year so whatever is there after
37:35the slash these call these are all called path parameters okay path parameters we call them as
37:44a path parameters what does that mean first it will go to the host or server in that server it
37:51will go to eBay folder inside this there is one more folder called users so this is a path okay
37:58these are the different folders available in the server so first it will go to the EPA folder then
38:03it will go to the users folder now inside the user folder there are so many pages are there
38:09and if you want to extract the data from the specific page we have to put the condition so
38:15this part is called query parameter okay this part is called as a query parameter so what is the path
38:23parameter is nothing but that will reflect the location where exactly the resource available
38:29and uh after question mark whatever you can see that is called query parameter that means which
38:35will able to filter the data from the server so in the user's location there are so many pages are
38:42there but which page content we required second page content we required so question mark page
38:48equal to two this is called query parameter and this will exactly give the resource as a response
38:58okay so whenever you take any uh Ura which contains these parts domain or host path
39:06parameters and query parameters sometimes you may not have query parameters so directly we
39:11can extract the data from the path parameters it depends on how they have framed the epas how they
39:17have stored the data in the uh database servers and accordingly the request URL will be framed
39:23okay so we need to understand this but host and domain path parameters and query parameters so
39:30whatever the path whatever you can see slashes right these are all path parameter after question
39:36mark whatever you can see this is called query parameters you may have multiple path parameters
39:41and also you may have multiple query parameters okay you can have end operator here and you can
39:48use multiple query parameters also this is just a basic understanding later we will see uh different
39:54examples and then we can understand better okay so here we created some type of request get request
40:01post request put request and delete request these are the different type of uh based on different
40:08type of request we created different type of test cases okay so now let us try to uh send this
40:17request let us try to test them through Postman so when you send some requests what we need to
40:23do there are two things are important when you're sending a request two things are important one is
40:27what what type of request we have to send okay this is a request type and along with this URI
40:34we have to also send some request payload request payload is nothing but what in the last class we
40:40discussed payload payload is nothing but what some data request payload is nothing but what whatever
40:47the data we are passing through the request URL that is called request payload and once you send
40:54your request once you get a response data right so that response data is called response payable
41:01and where exactly we do validations on request payload or response payload always we do the
41:07validations on response payload so whatever response the AP is given so on that response
41:14we do validations so what type of variations will do we will do status code validation so whenever
41:19you get some response which will give the response along with some status quota okay we will discuss
41:26about status code in detail later so for now just understand when you send some request we will get
41:32some status code So based on the status code we can decide the request is successful or not
41:38okay sometimes your request may fail so how we will decide whether it fail or not or success
41:43or not based on the status code So based on the status code we will decide whether your request
41:49is successful or not so whenever you are sending some request we have to send the Ura along with
41:57the request payload sometimes it is not applicable especially when you when you are using get request
42:03most of the times you don't have a request payload and but some APA requires need some authentication
42:09in those cases you have to pass username and password some token key something like that that
42:14should go along with the request type but most of the time we don't have any payload for get request
42:20but especially we have a uh request payload for post request and put request why because in the
42:28post request we will try to create a resource we will creating uh we will try to create a new
42:33resource in the database new resource in the database so that's the reason we have to post
42:38something here and even in the port request also we will try to modify something in the database
42:44what is the type of modification we do so that also we need to pass but in the delete request
42:49also we don't need to pass any request payload so the request payload should be sent along with the
42:55request type and once you get the response payload then we start doing validations on response
43:02payload along with the status code okay so these are the things which we need to do so now let us
43:09see how we can send these requests in the postman tool okay now let's go to the postman and we
43:17already created a new collection right under the new collection we will able to create a different
43:22type of request now expand this my collection if you add a new request you can directly click on it
43:29and this will go and add a request or else you can just click on this plus button here here you can
43:34see the plus button yeah can you see here this is my plus button I'm highlighting that you can use
43:39or else you can just go to the file and take the new and here also you can see hdb request
43:46so we can do multiple ways there are multiple ways are there if you want to do any task here
43:50okay so now what I can do is I'm just clicking on this link add a new request under this collection
43:56so click on add a request now as soon as you click on ADD by default it is added
44:02get request you can see here and here it is asking for the request type so let me just
44:07provide the name here I'll name it as get request okay I'll name it as a get request
44:17and you can rename this later if you want I'm just say get request and in this this is just
44:22a name so here there are so many types of requests are there but we are not going to use all of them
44:28in the projects we most of the times we use only four typer requests to get to post post
44:33and daily text so let's take a get request here and what kind of URL we have to send here Ura
44:40or URL whatever you can just copy this URL as it is copy this and then paste it over in the
44:49bar okay so now as soon as you add it here you can see here so query parameters by default these
44:56parameters are captured from this URL you can see here after question mark whatever is there that is
45:02called query parameter so that query parameter is automatically captured in this section param
45:07section and there are some other sections also there whenever you send some request
45:12right so if you want to send some body also along with the requester so then what kind of
45:18body or what kind of request payload we can send parameters authorization headers body prerequest
45:25Escape test settings multiple things are there so we'll discuss all these things later so for
45:30now just understand how we can send a request so I posted my URL so do we need to pass any request
45:36payload along with this URL for now you don't need to pass any request payload so then what
45:42you can do now you can just directly click on the send button so which will make a get request to
45:48the server so when you click on this send button now observe what is happening yeah so now we got
45:54some data here as a response right so we got a some data as part of response so let us try to
46:02analyze the response so we can just go down and here you can see multiple tabs here body cookies
46:11headers test results and along with them you can see something called status code how much time
46:17it is taken how much data we retrieved from the server so these details will be displayed here
46:22so this is the main area which we need to focus so when you send our APA request get request then
46:29you got the response from the server so here you can see the response body or you can say response
46:36payload so we do validations on this particular area so what are the validations we do is mainly
46:44status code here you can see the status code if your request is successful we will get a 200 most
46:50of the times and there are some other status codes also there different type of request based on
46:55different type of response we will get a different type of status code I will discuss later and the
47:00other one is how much time it is taken to get the response how much data we capture so how much
47:05data how much size of data we have got as part of response that information will be we are validated
47:12and other than this the body of the response so content in the response we need to validate
47:19and in the content you can just look at here this is a Json format sometimes you may have XML format
47:25sometimes you will get the response in the XML format so whatever it is we should able to do some
47:31validations on the response body also and here we will use something called XML path or Json path by
47:38using some techniques we will do some content validations on this particular response body
47:44okay those things we will discuss again later so apart from this response what what else we
47:49will test cookies part so whenever you send some response sometimes you will get the cookies also
47:55and those cookies should be validated currently this API is not returning any cookies so there
48:00is no data available here but sometimes when you send some requests which will also return some
48:05cookies those we need to validate and also headers and the headers is also having some information
48:12about your APA request like uh and in what date you have got the response what is the content
48:19type you capture encoding format connection type so there are some available information there in
48:26the headers and these headers information also we have to validate and the body cookies and headers
48:33these are the part of the validations along with the status code and other things and uh test
48:39results this is the actually Postman option which is provided so whenever you add some validations
48:46okay and then we will get this test results here so far we have not added any validations so that
48:52we just got only response here but if we add any validation points after while sending the request
48:59and if the validation got passed then you'll get the test results passed if the validation got
49:04failed then you will get the failure messages here and these things we will come we will get
49:09after applying some validations on the API request so that so far we have not added any
49:14validations so the test results part is also empty so this is called response body cookies
49:21cookies are nothing but what the temporary files temporary internet files which are created while
49:27browsing some pages even in a browser also the cookies will be created whenever you're browsing
49:32some pages your browser will remember the data right suppose when you log into the Gmail first
49:37time and after successful login without logout just close that application and the next time
49:43trying to login it will not ask you login again it will directly log into the Gmail how it is
49:49happening because first time when you're browsing sometime or first time when you're providing some
49:53information like registration data or logging data your information is saved in the cookies formatter
50:01okay that's called cookie cookie is nothing but though they are internet files temporary files
50:06which are created by the browsers which contains the data similarly whenever you send some request
50:12the server will give some response and the cookie is also part of the response and what kind of
50:20cookies they have created those things we will validate similarly headers also headers contains
50:25a what kind of response they have they have sent to us and what time they have sent what is the
50:30type of data so these details are available in the headers so as part of the validation so what
50:37are all things we do validations what are the validations we do once you get a response the
50:43first and most important thing is what status code validation status code validation and sometimes we
50:50also test the how much time it is taken okay how much time it is taken to get the response how much
50:57size of data we get so here it is reflected the data size 1.83 KB data which is written
51:05okay and these three things commonly required for every APA request to test apart from this
51:10the main important thing is what response body responsibility we have to validate which is
51:18normally in Json or XML format so later we will try to understand how many type how many ways we
51:25can violate the response body and after that what else we can validate cookies and also headers so
51:32these are all things we need to validate once you send your API request okay now let us try
51:41to send rest of the request so I have sent my get request here and uh I got some response here and
51:47later I will add validation send and so on now I'm not discussing about validations first initially
51:52just try to understand how we can send different type of requests and what kind of response we
51:58will get okay now if you want to save this you can directly click on the save button and save
52:03request that will be saved under your collection so get request is got saved now similarly if you
52:09want to send another type of request suppose I want to post require I want to send post what
52:14is post will do which will create a new record in the database which will create a new record
52:19in the database or new resource in the database and when you send a post request we need to also
52:25send a request payload we need to create we have to send a name and a job when you pass these two
52:31details then it will create a new record in the database or it will create a new resource in the
52:37database and what is the response you will get you will get the ID will automatically generated
52:42for this record along with the time when it is created in the database okay when it is created
52:50in the database even that also we will able to get the response here so this is a request payload
52:55this is a response payload okay now let us try to create this record in the database now we'll
53:02see the response how to send the post request let's copy this URL and here we do not have a
53:08query parameter just we have a path parameter now go back and if you want to create another
53:13request what we can do you can just uh select here collection and here add request you can
53:21use this option or you can directly click on the plus button here or you can select the collection
53:27or go to the file new and here you can take the HTTP request so for everything three options are
53:33available now let me just click on this plus button directly so that I am creating one more
53:39collection so this is a one more type of tab it is open previous one I'm just closing it so this is a
53:45new tab which is open here now I want to send post request okay so let me just select the post here
53:53and then select uh sending the post here this is a URL when you send the post and do we need to
54:00pass any uh request to payload here when you send the post request yes so where exactly we need to
54:07paste this this is a payload which we have to send right where exactly we have to post this
54:13so here whenever you send a body right request body we have to send through body section
54:19okay here you can see body section so select the body section and here whenever you want to send
54:25Json type of data you have to select the raw here raw option and here you can see different
54:31type of data text JavaScript Json HTML XML and so on so you need to select the Json format here
54:39and then here just paste it over here same data okay now this is our post request go
54:46to body section raw selector option and when you select the raw option it will show you different
54:52formats of data so whichever type of data we are sending just say Json and again this is not our
54:58wish okay so how the aps are designed what kind of format it will support all these things will
55:03be part of the document okay so all these things will be part of the document and developers will
55:09provide all this information and you should not use whatever information you want you have to
55:14prepare your test data request payload all these things according to the requirement what they have
55:18sent okay and some apis will support Json format some API will support HTML some AP will support
55:24XML So based on the API requirement you need to prepare the data So currently this support Json
55:30format I'm just putting the data here and then uh just click on the send click on the
55:37send now I'm sending the post request that will create a new user now observe the response here
55:44this is the response we got so name whatever name you have given the same name job ID and
55:51this ID is automatically generated by the server and when it is created so this is
55:56the actual response we captured actually uh this is a response now I'll just put it here
56:04okay this is the response we got and the most important thing is what id because tomorrow if
56:09you want to fetch This Record we have to use this ID okay so what is the status code is here 2 0 1
56:16is a status code whenever you send it post request most of the times it will create 201 status code
56:24okay so what are the things we need to validate here we have to validate whatever the name and
56:29job we have sent same thing is there in the response body or not and ID is created or
56:34not we need to validate and if there are any headers we need to validate headers and again
56:39status code time size so these things we need to validate so now if you want to save this request
56:45as part of the collection how we can save it just click on the just provide the name here
56:50click on the save button and then it will ask you the name request name I'll name it as a
56:57post request okay as a post request and where you want to save this under my collection select
57:04the collection and then click on the save so now your request is saved under my collection
57:12so now we have created a new record with the four double one is a ID okay this is a new
57:18record which is created on the database through our post request now suppose I want to update this
57:27okay I want to update this record so name job ID create suppose I just want to update this job or I
57:33want to update this name so how we can update this so we will make another request so this time we
57:39have to send put request to update but what is the URL we have to send now we need to send this URL
57:46so whatever the record we want to update we have to send the ID of the recorder
57:51so in the previous request we have send the post request right we got an ID four double one so that
57:57we need to pass as part of path parameter here okay so here we need to pass that ID
58:05and along with this what else we need to pass what is the content we want to update and that
58:10also should be part of your body section go to body section right so and then just a second guys
58:21one second okay so here just go to the body section under body go to the ra and here select
58:31the Json here we need to pass the uh request payload so what are the things we need to modify
58:37so I can just modify this and even this also based on the requirement we have to design while sending
58:44the push request how we can modify if we want to send only job sometimes it may not accept if
58:49you want to send only name not accepted so name and job is accepted so here four double one is
58:55representing the record ID right so in that record I just want to update these details if you want to
59:01update name you can also update name you can if you want to update only job you can update so
59:06previously what is the content we have name is same but job is China so here I'm just updating
59:10as an engineer so now let us send the put request this time click on the send okay now you can just
59:19look at this this is the record is updated you can see name is same but job is updated
59:24so this is actually updated record so we have updated previous engineer we pass now it is become
59:29engineer and also updated so this is a response we captured go back and this is a response we got
59:38once you send a put request so it is got updated and most important thing is when you send your put
59:44request we should specify the ID that is the most important okay so here four one one we prepares
59:53right so as part of your put request also we have to send four one one this is the most important
1:00:01okay this is how we can update the recorder suppose I want to delete this record
1:00:06okay so I just want to delete the record so how we can delete the record simply take
1:00:12another request let me first save this if you want to save this request you can click on the
1:00:16save and provide your name I can say this is my Port request and now same collection click
1:00:26on the save so now it is created under put request so I want to delete this
1:00:31so if you want to delete the request then you can send this request so same URL but you need to pass
1:00:37your ID so whatever idb generated earlier four double one so same thing we can't specify here
1:00:45four double one and do we need to send any request body here not required so not applicable just we
1:00:52need to pass ID as part of your url that's it now when you click on the you have to select
1:00:59the delete option here okay delete and then click on send then the record is got deleted
1:01:04so you will not get any response here because record is not there so the response is what 204
1:01:10no content means what the record is already got deleted so that it could not find any new content
1:01:18so this is status code we have to validate so this is a about delete request now if you want to save
1:01:25it again click on the save button and provide the name here delete request and then save it so like
1:01:36this we can send different type of request and we can save those requests under the collection now
1:01:44the collection is having how many requests totally four requests get request post request put request
1:01:51and then delete request so whenever you want to run the request what you can do again open this
1:01:57and again one more time click on the send and this is a Content which is having the second page and
1:02:03if you change the page name accordingly the data will be displayed now I'm sending one here so now
1:02:09you got the data from the first page okay now I say three here and then we will get the data from
1:02:15the third page and when you send two here then you'll get the data from the second page so like
1:02:21this you can test multiple times once you create a request you can run them any number of times
1:02:25and similarly post request you can send this multiple times because this record we already
1:02:30deleted so which will create another record and put request we can again resend to update the
1:02:36record and delete record so getting the resource posting put and delete the resources for doing
1:02:43these operations we can use four different type of requests get post put and delete it so these
1:02:50are the sample and just demo apis but we are not going to use this we will create our own apis and
1:02:58we will try to use some real-time API so that we will get lot of response content and we can
1:03:02do so many types of variations so this is a basic understanding so we have created a new collection
1:03:09so we knew workspace and then we created a new collection and inside the new collection
1:03:14we created different type of request and we try to understand what is the request payload and
1:03:20when you have to send how we'll get the response payload and what are the things will be there as
1:03:25part of the response we discussed and the later we will discuss how we can validate these things
1:03:31okay there's the next part so first we need to understand the basic stuff
1:03:36okay so this is how we need to send all the type of HTTP request
1:03:42so now let us discuss about something called status code so this is most important HTTP status
1:03:49codes so what are the different type of HTTP status codes are available because at the time of
1:03:56validation which is very very important so based on the status code we will check whether your
1:04:02request is successfully done or not okay this is also part of the validation so now we'll see how
1:04:11we can what are the different status scores are available and how we'll know that so let me share
1:04:18small picture and uh there are multiple series are there so all the status code we can divide
1:04:25into three different uh levels okay three different levels so one is called 200 level
1:04:33okay and the second one is called 500 level and there is one more thing called I think 300 yeah
1:04:40400 200 400 and 500. 200 400 and 500 so these are the three different levels or we can say
1:04:49uh series also we can say series 200 series 400 series 500 series we will categorize all
1:04:56the status codes into three different series now if I just look at this picture under 200
1:05:02we have 200 201202203 and two zero four so every status code is representing something
1:05:10okay so when I say 200 means what the request these are all successful requests the request is
1:05:17successful so 2-0 series are representing the your request is successfully done okay and what 400
1:05:25series are representing 400 series are basically representing like unauthorized access of apis
1:05:32okay suppose if there is an API if you want to request if you want to send some request to the
1:05:37API you need some authentication some apis are required some apis required token authentication
1:05:42some apis required like a digestive authentication or better token authentication different type of
1:05:49authentications are there so if you are not properly specified there's authentication you
1:05:54cannot send proper request so in those cases you will get 400 series is status codes like 400 bad
1:06:01request 401 unauthorized four zero three four billion four zero four not found four zero mean
1:06:07conflict so these type of status codes you will get and suppose you are sending some requests to
1:06:13the server okay and maybe some problem with the network or some sometimes the network the server
1:06:21is down okay our server is under maintenance so in those cases you will get 500 CB status course like
1:06:28500 internet server error 501 not implemented Phi zero to bad gateway service unavailable
1:06:35Gateway time Road Network timeout so these are the different status codes you will get when when you
1:06:41send your response okay so if we have them you have to remember because in entry also people
1:06:46will ask you can you tell me some status code for successful rest request like 200 okay when
1:06:52you will get 200 okay or when you will get 400 bad request okay and when you will get 502 bad gateway
1:06:59so people will ask such type of questions or in another way they will ask a different thing like
1:07:03can you tell me some HTTP status course you got while testing your apis so at least you have to
1:07:09remember three to four hdb status course and that is okay for you okay so these are the different
1:07:16status codes so these are the different levels guys so 200 400 and 500 series and these are
1:07:23also part of validation we should also validate these status codes which are very very important
1:07:31okay so what we have discussed so far let me just recup once again and we have understood
1:07:38what is workspace and how to create and rename and delete workspaces and workspace contains a
1:07:44n number of Collections and we have seen how to create a collection how to rename it how
1:07:49to delete and how to run the collection if you have a multiple request then you can run the
1:07:53collection so if I just go to postman here we created four type of requests right we can also
1:07:58run the directly collection if you want to run the all four requests at a time okay suppose if
1:08:06you want to send the request one by one we have to send like this open every collection every
1:08:11state every HTTP request then we have to click on send button instead of doing that what you
1:08:17can do we can directly run the collection if you run the collection all the requests will
1:08:21automatically execute one after another now if I just click on Three Dots and when you see here
1:08:27run collection option there and when you run this run collection all collections will automatically
1:08:33execute against you can see all the collections whatever collections are there so whatever request
1:08:38you created under collection which will show you here and you can also select unselect whichever
1:08:42you want exit you can select and then uh you have to select the iteration So currently one iteration
1:08:48how much time delay is required let's say 2 milliseconds for each collection and then click
1:08:53on run my collection which will automatically run all the requests from your collection now
1:08:58you can see all four requests are successfully executed one after another okay so this is how
1:09:06we can also directly run the collection which will automatically run all the requests which
1:09:11are created inside the collection so now we have seen how to create a collection renaming deleting
1:09:17and run the collection and we can create any number of collections under the workspace and then
1:09:25we understood what are the different type of requests we can send under the collection we
1:09:29have understood get request post put patch and delete requests some basic examples we have seen
1:09:35and also we have seen what kind of validations we can do on the APA like status code time size data
1:09:42response body cookies and headers and finally we have mastered about data Sports okay these are all
1:09:48very Basics before starting actual API testing so in the next session we will see how we can create
1:09:55our own apis because these are very simple and very demo kind of apis they will give you uh very
1:10:00basic apis but we will create our own apis for our testing purpose because if if you start using
1:10:07apis which are available online so sometimes those apis may work sometimes may not work they are not
1:10:12consistent okay they are not consistent so better to create our own EPS it is very simple to create
1:10:19our own apis I will show you how we can create our own apis for testing purpose and once you create
1:10:25it then we will see how we can send different type of request and also we'll see how we can
1:10:30put different validations on the API response okay so that's the next part so today I will stop here
1:10:37and tomorrow session if you will continue rest of them I will share this document Excel sheet
1:10:42and Postman installation document and I can also upload the collection guys suppose I want to save
1:10:49the collection I want to share this collection to somebody else how we can do that we can just click
1:10:54on this dots and here you can see a collection made just beside the collection my collection
1:11:01click on these three dots and you can share you cannot you can find one option called export
1:11:08okay so once you click on export here then it will select the select the default option
1:11:15second one and then click on export and once you click on export you can save the collection you
1:11:20can just go to uh somewhere desktop and this is the name of the collection and click on the save
1:11:27all right so now I have uploaded my collection I have exported my collection
1:11:31suppose I will share that collection to you I will upload that but how we can use
1:11:35that collection you can import also if I don't want to create these requests so I uh I suggest
1:11:41everyone to create your own collection your own request because you need to practice this first
1:11:46you should be familiar with all Postman options okay suppose I have shared my collection to you
1:11:51how we can import that collection in your Postman suppose let me just delete my collection here
1:11:57I'm deleting my collection I don't have any collections now whatever collection I have
1:12:02uploaded right exported then I want Import in my Postman similarly you guys can also import my
1:12:07collection on your post so how we can import go to workspace directly you can find import option here
1:12:14so click on import and then browse the file so there are multiple options are there just select
1:12:19the file upload files and whichever collection just now you export it select that selection
1:12:25file Json format and then say open and it will show you the details here then say importer so
1:12:32automatically you will import collections so like this we can also export and import the collection
1:12:41okay so this is how we need to export and import the collection okay so just
1:12:50practice these things for today and tomorrow we will continue the further things okay yeah