Learn API Testing - Postman, Newman, API Automation | Prashant Kumar | Skillshare

Playback Speed


1.0x


  • 0.5x
  • 0.75x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 1.75x
  • 2x

Learn API Testing - Postman, Newman, API Automation

teacher avatar Prashant Kumar, “QUALITY” is my Passion!

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

    • 1.

      Course Overview

      2:19

    • 2.

      A Tester's Viewpoint

      8:53

    • 3.

      What is an API?

      4:29

    • 4.

      API Testing Basics

      5:01

    • 5.

      Client-Server Architecture

      1:36

    • 6.

      Webservices - SOAP v/s REST

      2:55

    • 7.

      API Test Cases with Example

      8:33

    • 8.

      POSTMAN Setup and Installation

      6:14

    • 9.

      API Testing using POSTMAN

      18:17

    • 10.

      API Test Automation using NEWMAN

      10:38

  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.

344

Students

3

Projects

About This Class

Learn API Testing - Postman, Newman, API Automation

This class teaches you API Testing from scratch with live samples of installing, setting up Postman- Newman tools, and performing manual/automation test of APIs.

I will be more than happy to provide one-on-one support or add lessons to the course to answer any of your questions on this matter.

So, there's no reason to hesitate! You can basically try the course, and see the benefits yourself! 

I can't wait to see you in the class!!!

Here are the advantages of taking this course:

  • Enhance your Software Testing skills by learning API Testing

  • Good understanding of web services and client-server architecture, useful for any technical interview.

  • Learn to plan test cases, write & execute tests and find bugs in the Business Layer of AUT.

  • Learn the setup/configuration of Postman and Newman with a live demo.

  • Live demo for Manual and Automated API testing.

  • Tips based upon my testing experience of API testing with Postman and Newman. 

This course is beneficial if you are planning to:

  • Learn API Testing Fundamentals.
  • Learn about the Techniques involved in API Automation.
  • Learn the Test planning for API testing.
  • Learn to install and set up Postman/Newman from scratch.
  • Learn API test automation using command lines.
  • Learn API test reporting.
  • Live testing Demo using Postman and Newman.

Also in this course, I have included: 

- Lectures on Client-server Architecture and Webservices - REST v/s SOAP.

- Step by Step Postman Installation and setup guide.

- API test cases ready to be downloaded and used!

Just try this course, and you'll receive access to all the slides, and test cases, source code used in the lessons. Please feel free to provide your review for the course and you can download/refer to them when you want to jog your memory or double-check your work.

Happy Learning! 

Meet Your Teacher

Teacher Profile Image

Prashant Kumar

“QUALITY” is my Passion!

Teacher

Hello, I'm Prashant, a seasoned QA professional with 14 years of extensive experience across Application System Integration Testing, Regression Testing, Mobile Testing, Automation Testing, Performance Testing, Database Testing, Security Testing, and Quality Assurance.

I am here to share, what I learned in different roles during my career as- Java Developer, Quality Analyst, Business Analyst, Test Consultant, Test Lead, Test Manager, and finally – Quality Head at major IT firms, Investment banks and start-ups across USA/ UK/ Switzerland/Germany/India.

With an Engineering degree in Computer Science, Postgraduation in Management and specialization from Harvard’s  University, ICMS Sydney, I consider myself, an avid learner and I b... See full profile

Related Skills

Development Web Development
Level: Beginner

Class Ratings

Expectations Met?
    Exceeded!
  • 0%
  • Yes
  • 0%
  • Somewhat
  • 0%
  • Not really
  • 0%

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.

Transcripts

1. Course Overview: Hello friends. Welcome to my course on API distinct. In this course, you are going to learn postmen, new man, and API test automation. So let's go ahead and see what are the main contents of this course and why should you take this course? I have more than 15 years of experience in the IT industry. I hold PC specialization from Howard University and ICME Sydney. I have Masters in quality management and I'm a graduate in Computer Engineering. I worked as a software developer, business analyst, Tech Lead, Consultant, program manager, and corinthian and working in the quantum state. And I have worked at major IT firms, startups across USA, UK, Switzerland, India, and Germany. I had been working as a mentor for QA enthusiastic across the globe over the decade now. So why should you take this course? With this course, you can upgrade your software testing skills by learning the API testing. This course will give you a good understanding of verse services and client-server architectures. It'll be useful for any technical interview. You can learn to plan test cases, write and execute the test, and find books in the business layer of application and the testing. With this goes you can master the setup and configuration for postmen and Newman with a live demo. With this course, you also get the live demo for manual and automated EPA testing goes contents. So falling into topics which are going to cover is the part of this course. What is an EPA? What is API distinct and why to perform API testing? Then you learn about client-server architecture, the services, soap versus rest API test cases with examples, postmen setup and configuration, API testing using Postman API test automation using new man. This was a brief introduction and more discourse. I look forward to see you in the next part of the school's. Thank you. 2. A Tester's Viewpoint: Hello. So now you are done with the course overview. And before we go ahead and move on towards our first part of this course, I'd like to share it. This test point of view regarding API testing. Epa testing has a lot of components and many times, API testing is often compared with UI testing in terms of software testing, it is ready significant quotient that which way to go EPA distinct side or towards the USA. So before you, when you do this, companies and you have to understand what is the difference, what is the basic difference between EPA and DUI? One of the most important difference is complexity. Epa and UI, they both have different level of complexity. Gui doesn't require too much technical know-how or it did not. It doesn't need any kind of special methods of languages to test. Whereas on the other hand, API requires technical skills to leverage. You need to understand various coding languages, as well as learn various techniques for making API request and bring the APA testing. Additionally, while giveaway requests, very few resources, API requests, a lot of things including back-end storage that is backed by logical architecture liability of scripts, and the glow management. You also have another component which is time factor. Would Gy and EPA can be used for testing application functionality not doped. However, unlike APIs, which a certain action GUI interfaces or graphical user interfaces, dust then to take a lot of planning. And then last but not the least, language dependency in DUI. You can have any kind of languages which are like graphical user languages for which the cool languages to be used. And then using that colon width, you have this keyword limited testing and automation taking place. But for API, you can have XML or descend which are independent of the languages. So for APA testing, you need not depend upon any language, whereas for GUI testing, you, you may have to depend on some kind of languages. So now, when we know what are the basic differences, we have to see which way to go. I did toward the UA side or towards the API side, how to decide it? In order to decide or to find this answer, you have to come up with the kind of approach based upon my personal software testing experience and the kind of 15 years of software testing which I have done in the past, I can recommend a better way of doing it. So you can divide your testing into two part, UI testing and EPA pasting. First, test as much as you can with the EPA testing. Take a look at all the possible end points and create a suite of tests for each of the endpoint. Be sure to test. Both happy path and the possible error part. On every test, you should have a solution to get the correct response code. And then you should verify the different kind of request. For example, get request, post, put, delete all this things. For delete. You can first delete and then you can go back and using good, you can verify whether the sources has been deleted or not. Similarly, you, once you have tested all the scenarios with API, then it is the time for thinking about UI testing. You first consider your most common users Tori, okay? And then in that user story, think about the user actions. What it uses is going to perform on the, you know, once you have this user's story and the user actions, then you can go ahead and start testing the functionality based upon the UA. And, and this is how you do the UA testing. But if a user is interacting with the UI and his portfolio in certain kinds of functions and didn't work. The business logic. And this business logic is handled at the API level. So you have to test it using APA. So I believe No, you know what EPA distinct does and what you are testing this with your friends. With this, we come to the next part of our slideshow presentation, which talks about where to test GUI and EPA. So this is a really great area. You don't have to be like in a black and white situation that only this API you are only test. Do you know? Depending upon the requirement, if you have to take the business logic, in that case, you have to test using API when you have to test the functionality or the UI component of the application than new test giveaway. Similarly, what is the importance of learning this API testing? Many of you would be thinking that in future, or if you already know software testing, then what are the plus points? So what are the benefits which I'm going to get after learning the CPA testing. So Thurston, I had been doing testing for very long and I have learned block when it tastes like functional testing, automation testing, performance testing, but with API testing coming into my skillset or getting knowledge about EPA testing, I can now test lot many more applications. I'll tell you how you have built applications, like any banking applications. Or you have a card, software in a card, or maybe you have an enterprise applications. Inside the enterprise organizations, you have mobile devices and the software in the mobile devices, you have certain sensors like weather sensors. You have vertebral devices like different kind of variable fitness band or the watches. Smart watches. You have television, you have internet, you have gaming industry and software lipid to the games. So all these applications, all this program, the need in order to perform did business logic calculations and interact with other applications. So this is what EPA comes into picture. And here you need some software test engineer to apply his APA distinct skills in order to ensure that EPA doing the correct kind of work, the expected response is working fine and things are working in the right manner. The business logic is working correctly. And on the UI, we have the right kind of information, how exactly we do it. In coming slides on the coming parts of this course, you'll get to know, I'll talk about everything in detail we already or you already have given you an overview what I am going to cover in this course. But the technique and different ways of testing and what protests and how could list all these details along with hands-on example, plus discusses, plus the setup. Everything will be given to you at the part of different kinds of slides in this course. Okay? And now this is also a very important slide which I wanted to discuss with you. Based upon my experience, I have seen there are a number of API testing tools in the market. So there is soap, you way, postmen, quark-gluon, acceptability, APD, apart to Jamie to that's the short percentages in karate and lot many of them or just noted down 19 of the main applications which are being used for APA testing, main tools which are used for APA testing. So in market did a number of tools and you can choose anyone of them. It's up to you. I personally find that postmen is very easy to learn. And then using postmen, you can clear to collections, you can do performance testing and you can go ahead and test the application and API in a very fast and easy manner. So that is the reason I have to then EPA, but feel free to use any other application. The concept remains same. What I am going to discuss in the remaining parts of this course, the concept will remain same and you can apply the same concept on any other tool artifacts. So with this, we come to the end of this part and see you in the next part. 3. What is an API?: Welcome to the part one of this course. And this part will see what is an API. Lets see what is an API with an example. Api is like a connected between two services or applications and help them to talk or communicate with each other. So here is an example to understand this concept in a better way. You can see in the left side is the client. And this client, he visited Australia or a hotel. You want something to eat. So he provides order. The audit is given to a bitter the winter then passes this order onto the chef. You can clearly see declined and the chef, the both are communicating with each other. What do we claim means is prepared, ready by the chef, whatever chef he makes that is provided to declined. But this is all done through a connector or the mediators. And this connector mediator, which is return in this case, is something what EPA does in the real world. Whenever you have two applications and they want to talk or communicate to each other, they do so with the help of an API. Epa is equal to application programming interface. So you can see front-end and back-end the boat. If they want to communicate to each other, they can do so with the help of API. Api is a software intermediate 3D that allows to applications to talk to each other. We have seen the same thing in the previous slide. Api enables a web-enabled application to fetch data from the server. When I say server, it is the backend server. It defined the kind of calls or requests that can be made, how to make them. The data format that should be used for the request and response at sector. This understand the concept of API using a real life example. So now you are aware of the basic concept of API, and I'll show you how exactly EPA is making a request. And I'm going to use the generic application, something like yahoo.com. So many of you might have access to Yahoo.com and you have a front-end. But have you ever wondered that behind this front end, there is the API level which is behind this front end day, the EPA which is connecting this front end to the backend. And right now we are going to see how exactly it happens. Friends. What I'm going to do is right-click and click on Inspect. So as soon as I click on Inspect, I have certain sections over here. And then we go to the Network tab. And now I'm clicking on these links, finances, your finances. Or I'm clicking on Yahoo mobile. Okay. I'm clicking on Yahoo with so you can see network is recording a series of EPA calls. And when I click on this, so you can see this is the API request. And the request method uses get the status code for the response which has been deceived is 200. And this is the response herders. And this is the complete data. So this is what is a API request and response. And a similar kind of thing is being used by most of the applications, which we see you name it. And most of the applications they have EPA working somewhere. Yeah. Oh, with Google, with all these applications, they use API internet. So this is how you can see with the deal life example how EPA's helping connecting between the front end and the back end applications and they act as a intermediary to be the same thing what we discussed in the previous part of our orientation. With this, we come to the end of this part. See you in the next part. 4. API Testing Basics: Welcome to the part two of this course. In this part, we are going to see what is EPA testing and wanted the importance of APA testing. Api testing is the type of software testing that involves testing application programming interfaces directly and as the part of integration testing to determine if they meet expectations for functionality, reliability, performance, and security. Since EPA's lack Dui, EPA testing is performed via specific tools like postpone, Tosca, Demeter at sector. So if you see most of the applications, they are divided into three layers, which is like Presentation Layer, Business Layer, and database live. Now, Presentation layer has a UI for which we have GUI testing. Next you have a database layer, which is working at the backend. And for that, you have vacuum testing. In-between documentation, lead, and database layer, there is a business live wherein EPA's they are used for testing and API testing works in the business layer. What is common in all these applications? You have been using many of these applications on a day-to-day basis. Heavier wondered what is common in all of these applications. All of them, they use some kind of the API for communication. So friends, whatever you see nowadays or whatever applications you are using nowadays, they may internally use API. And if you know how to do that, is, I believe you're adding a greatest skill to use concept. Why to test API? What is the importance of testing EPA? So here we have some very important points. It is used for testing the business logic. Apa holds the business logic and the EPA testing can be used for testing the business logic for the applications. It is far more less time consuming than functional testing. Since it has no UI. It becomes easier and faster for you to test. Then testing the functionality. Using APA testing application can be tested without the user interface. It can be used for unit testing, integration testing, and regression testing, load performance, as well as security testing. With the rising cloud applications and interconnect platforms, EPA testing is a necessity and it is a must-have skill for every software tester and Keeler professionals. Many of the services that we use everyday rely upon hundreds of different interconnected APIs. If any one of them is failing than the whole service, is don't want to work. So does not mean you have seen in the previous lane, there's so many applications which we are using on day to day basis. And this amount than if the application is not working. And the underlying these and for that application to fail is API issues. Something is wrong with the API. And because of that, the multiplication will clash with APA coming into the picture. Most of the applications they need somebody to testing. And in case you know how to test API, you are adding a greatest concern. So now when we know what is EPA testing and why to do APA testing here and add a few points from my personal experience that how to test API. So in order to rest API, we have certain steps. In ward. Those steps. Add discovery testing, usability testing, security testing, automated testing, and documentation. So the part of EPA testing, we have to figure out that after manually executing all the test cases and all the deleted scenarios, we can discover it. Or you'd like to discover the kind of issues. And then we have to do usability testing to verify that EPA is functional and user-friendly than we do security testing, which includes the type of authentication which is required and with essense to data is encrypted or not, then we do automated testing. Epa testing has new mentholated automation, which I have included in the later part of this section. And then we have documentation. So whole of the tasting of EPA, what you're conducting, you should back it up with the proper kind of documentation, which is advocate and provides enough information to interact with the API. With this, we come to the end of this part. See you in the next part. 5. Client-Server Architecture: Hello friends, welcome to the part three of this course. In this part we are going to talk about client-server architecture. And architecture declined competitors and the file server's front-end, back-end. They both are tied together and there is no API needed. And second tier architecture, client computers and the database till debited into different layers and they directly communicate to each other. Again, in this case, you may or may not need any API. The tiny mist taxable three-tier architecture. In this one, you have client till the business logic tier and the database till. So client here and database tier, if they want to communicate to each other, they're declared API. It is business logic tier. And this is what we have seen in our previous slides, that EPA, it acts as the communicator between two different layers to different tiers, front-end and back-end. And it contains the business logic. So EPA is responsible for the business logic layer. And this access the intermediate or the connector between front-end and back-end. And this is what is very much event with a three-tier architecture. So going forward for this course, we will consider all the applications are the three-tier architecture. And I'll show you how exactly EPA can be used for communication. And how can you test this API? With this, we move on to the next part of this course. See you in the next part. 6. Webservices - SOAP v/s REST: Hello friends. Welcome to the part four of this course. In this part we are going to talk about their services, soap. And just in simple words, if you say, what is the web service output, say this service is the service of Levin over VIP service, an ambience communication between applications over VIP. Investor risk provides standard protocol or format for communication. The service provides platform independent communication and to understand it better, I have examples for you in November and the first part of the school's Well, we were talking about APA. I gave you an example of the restaurant where the client who walks through and then he gives you the order to the visited and vendor ordered is daily food is then transferred from the chef via Twitter to the client. Stable, right? Will extend the same example over here to understand the web service. So you see at the left side of the summit, they declined a client request. And he request we're making API request and he orders a food. This food is ordered vibrator, which is in turn APA, in our case. Apa then sends the order to the kitchen. The API requests is then forwarded to the backend server, back-end server when the order is daily, it notifies that or that is really an API responses received. The orbited industry vetted the waiter then Thursday for two declined and EPA responses forward into declined. So in this way, hallway Service Act, they're two different can offer services which we're going to talk about. First things soap. And the other one is this tPA. So T stands for Simple Object Access Protocol is a protocol, and this stands for Representational State Transfer. This is an architectural style. So I can't use this because it is the protocol. Where does this can also use soap lip service because it is a concept and can use any protocol like SCTP. And so, so it requires more bandwidth, that idealistic quest, less bandwidth. So permanent XML data format only where there's less permanent different kind of data formats that is plain text, esteem and XML, decent extractor. Soap defines its own security, whether this full webservices integrated security measures from the underlying transport. Now these are two different kinds of services. And over here we're just talking about them briefly, not to confuse you and this, to give you a little overview about this. And so with this, we come to the end of this part. See you in the next part. 7. API Test Cases with Example: Hello friends, welcome to the part five of this course. And in this part we are going to talk about APA test cases. So by now, we have already talked about APA, it's importance and different kinds of architectures and world and what exactly the use of API in terms of pasting. So without wasting any further time, we are going to talk you about EPA test cases and how exactly testing is being done for APA. So in order to start the two testing, you have to come up with the EPA. You have to design, you test cases. And how to design this discusses will see with an example, so forth, EPA testing, you need to have different HTTP methods. For example, use getMethod for vetting or grabbing the data. You use post-mitotic for writing data to the backend server. You use put mattered for updating the data in the back-end servers. And then delete is for deleting data from the backend server. These are the different kind of metals which we are going to use a part of our test cases and for testing and going to use API requests with is Ali QWERTY is dot m. This is the website. You can also try different kind of request response. These are the different kind of API request which allowed on this website. So you see, when you click on Get, it'll give you a list of users. The response courts should be 200. Similarly, if it click on Get, it'll give you a list of single user using this. And it has a response code equal to 200, and this is the single users. Similarly, if you want, you can create your own user with the data. And response should be to Z response score between 01. And this is the data. If you want, you can update it using post request. You can update the data and then you can delete the data. So I have taken all these five scenarios at the part of our testing. So you can see the first one is using getMethod. And over here we are having API request, which is RPQ. And yes, EPA uses cushion mark Pj equal to two. So this API request, it returns a list of users with a query parameter that Ps is equal to two. So if you see a click over here, what is so when I click over here, this request is sent an asinine district Crisis Center, the backend ABC with response. Ok. So the part of APA testing, you need to have some expected behavior and then do the expected behaviors are to be verified. So not acquiring embody, it has expected response. It should return a list of users. Expected response code should be 200. Then we'll write some tests to desert example of protest, wherein we check the response code with the response code is equal to 200 or not, whether it is having a body of data. And then inside the body with the response page number is equal to two or not. And homely record so shown per page. It should be equal to six. These are the different kind of data checks what we're putting on the data, what we're receiving through EPA. Similarly, we have all second test case within this. Wherever we want to get a single user in order to fit a single user, we have to fire this EPA query and the request. When if I discredit the expected response, court should be 200, you should get a single user data. And then in this case, the query has the part parameter Users slash Sharon. So this will give me four user ID equal to seven. It will give me all the details to that reason. Again, we have to date the response code. We are to validate the body has the response body has data passed that response body and check if the first name of the dataset has myelinate and the last name of the dataset as Lawson in it. So this is what we have to verify m how I am writing this desk is I'm writing this test case on the basis of the square root. Let me show you. Get single users. If you click here, you get this response. And it is being done for APA is equal to two. Having executed it fought, API uses seven. So a user with the user ID seven, he should have a name as Michael, firstname as micro, second immense Lawson. Then the next request, what we are going to FAD in the post query. And in this one, we'll try to create a new user with name. Malthus and job grew like cool to leaders. After the request has been sent and successfully dataset has been created, then there should be no AD and the record should have created timestamp. Expected response curve should be 201. And we should see a new record created. What is to be validated in this case, the spot score, that is 201. The body has an ID, response body has an ID for news, and response body has created a bag in it. Similarly, we'll have another desk is, which is for protests HTP method. So here we want to update the user data, what we are created previously, we want to update the job rule from leader to z on the student. Name will be same morphous and JOB Zealand resident. And then after successful update, the updated_at timestamp should be seen. Expected response curve should be 200. Here it is, using the user ID parameter is uses less ID to the same entity, which was denoted in this step. Here, whichever AD were generated, we have to use the same AD and post that. The status code should be validated. District goal should be 200 and the body shouldn't have it diabetes updated at this tank, should be there in the responsibility. And finally, we have the last test case which talks about deleting the userData. Here. The detail user data, what we're greeted seem data was updated throughput as HTTP method and now we're going to delete the same user data. Over here. You should get a response code equal to 204. And the record we want to delete, it uses less ID, the same user ID which was created earlier. And then 100 requesters successfully processed. Getting status cooled with the response code. Should we do 0 full? This is what we should receive. So this is how you create these cases for different scenarios for the APA distinct, Don't worry, I understand you might be having some quotients regarding as TTIP matter, decreased body APA request to you, expected response, response called and about this test, right? So what they'll do our next slaves. And in the next part of this course, we'll do some installation and pulls. Those is astonishing and configuration checks. We can then start with postmen. And in the postmen, all the test cases, what I have written over here, I'm going to execute using Postman and I'll show you how exactly this test data should be integrable there. How did this parameter should be in terrible there in Postman and posting decryption, what should be the expected result? And if everything looks okay, the test results are as per our expectation or not. So friends see you in the next part of this course. 8. POSTMAN Setup and Installation: Hello friends, welcome to the part six of this course. So in this part, we are going to see how exactly we can configure postmen tool and how to do the whole setup. For this setup, I'm using the Windows ten machine. You can do the same thing on Mac or any other Windows machine. So in order to install postmen, you have to use this link, postmen.com slash downloads. And over here there are two ways through which you can use postmen. Either you can download the app and then use that downloaded version of application. Others, if you want, you can use the web version of the application. But for this, you have to clear the login. You have to create an account with the postmen. And you can also use the waivers enough Postman application. But for now, I'm going to download the application and proceed with the installation. Mine is a 64 bit. You can use any operating system. So once the installation is done, I click on the dot EXE file as a result of which the histology and started. So you can see that the postman app is getting installed on my machine. And now you can see the installation has been complete and I can see that it has been installed. And it asked me to a free icon, which I'm going to skip for now. Here I have my workspace, the postman workspace, which I'll be using for my testing. And to show you how exactly to execute all those disk is, is what we defined in our previous part. So I'm clicking on create a collection. A collection is nothing but a collection of request which we can use as part of our testing. For example, in my previous test, I have shown you the five tests. And all those five tests can be executed individually. All we can club them together under the collection. So I am going to create a new collection. And in this collection I'm going to add request. And this is the request which I'm going to add to it. So in order to add a quick before I go ahead and added a twist, I'll show you a little bit of setup. So you can see this Setup icon with talks about settings. And over here, you can see all the settings which are to be used. So I'm using the default settings, but with the help of Google and with the help of help documents from the postman, you can always change the settings in case if you need any detail information regarding settings, you can always ask me, feel free to ping chat or the.me methods, and we're more than happy to return a response to youth credits. Over here, you can have team, black or white team I'm using white. You can also define your custom shortcuts. They already have some inbuilt shortcuts, but if you want, you can define it as well. You can explore the whatever data that is generated if you want, you can export the data set or you can also import Postman dump data and announce. This new men are drawn from npm, which can be used for automation. We'd see it in the next part. Certain certificates. If you want to add some client certificates, if you're testing application which requires some claim certification, then you can add those certificates over here. If you are using some proxy connection, many of the organization they use some proxy connections, were connection, internet connections which have certain proxy. You can configure those proxy. You would hear. If in case you want any updates to be automatically downloaded, then you can enable it, but I am leaving it as disabled. And the ideal gate divergent, if you click on a boat, you'll get about diversion. What exactly they're within the current wisdom, what we are using is was an aid or No.1. Also, if you see this icon which resemble similar to why it is called environment quick look. So here you can set the environment parameters or variables, which will be used for testing purpose. So you can see environment and if you want, you can add certain environment variables. Similarly, if we see global variables and you want to read those global variables, you can do it over here. I'll show you how to edit, how to add environment variable as a part of our next presentation slide. So in this side you have collections, you have the list of GPAs. If you have several EPA's to work with, you can have different workspace. You can add in your workspace over here. You can use several environments for your testing. For example, in a production environment, you can have a testing environment, you have a staging environment. If you want, you can have mock service to mark the Bachman and backends to mock the back-end servers, monitors. These are used for checking what exactly you worked this place. Hollywood workspaces performing how many days have passed Holman tester fear for that. Use, monitors and history. It talks about any of the requests which you already worked upon. All of them will be visible over here in the history. So this is a brief idea about postmen. We have seen how to install postman on Windows. You can do the similar thing on backends filled is pretty easy. And we have seen the several settings and configurations and know what we're going to do. In the next part, we'll talk about how exactly those test cases between defined in a previous part. How can we convert those cases into actual test scenarios or the API testing sued over here and execute them. So friends see you in the next part. 9. API Testing using POSTMAN: Hello friends. Welcome to the part seven of this course, EPA testing using Postman. And this part, we are going to see how exactly we can test all those tests scenarios that we discussed in the previous parts. Using the postman. We have the postman setup ready. Now, we have all these cases handy. So let's go ahead and start to write the test and executed using Postman. So we have our new collection which is not having any of the requester net. So we need to click here on Neil. As soon as you click on pneumonia option to add new request or a collection or the environment. We want to add a new request to this collection. So we'll click here on the request. And the astronauts, you click on the request option. You get this screen wherein you have to give the request name and select the collection in which you want to save the request. So this is my first requires us first request and save it in new collection. It is saved. Now, you see here we have a drop-down through which we can select the HTTPS methods, get, post, put, delete. These methods can be used over here. There can be selected, and here you have to use the URL API, URL, which you want to use for your testing. And in case if we have any parameters, then you can add it to hear that part of credit parameters. So what we'll do, you remember this for the request, what we have created based upon our discusses. So I'm taking this API request. You can always take it from here. You have the examples. So you can, you can take any one request are the curious dot slash api uses. Question-mark is equal to two. Same thing over here. P is equal to Vl. Using this one, it doesn't require any body. So we are taking this URL and pasting it hears. You see it has the parameter beta equal to two. You remember we talked about the parameter P is equal to two. C credit perimeter P is equal to two. So it has order detected and we can see a parameter P is equal to two, then if he, if he hit on sand. So we have a request response which has been the CO2 would hear. This is the response when we hit from the front end, when this request is sent from backend, this response is received. Okay. And you can see in this response we have paid but paid total, total PTs and data. These are the different types of different parts of the response. As a part of our test, we have to verify these things, which I have written for you with you to see your time and explain it to you how exactly we write this test. So no. You can see over here I am writing a test which is about validating the status code. So over here, this is a free text reading. I'm writing a test for validating the status code, which is validating the response code dot card, and it should be equal to 200. You see, when did the quizzes successfully processed the response code 200 is received. So to check whether the response could to embedded, deceived or not. Similarly to validate the response body, whether the response body has deterred eigenstates st. If response is successfully received, it should have a data tag. And then this dissonance past and also via verifying the page. So you see the page on the spot should have pitch count equal to two. This one, this part is having episome sphere using a parameter equal to two, we are validating that the response, what is the received? It should have been equal to two and then verify it page per record. But the response has a count equal to six. So verifying the page per piece count is equal to six. Ok? So these are the four test what we are doing over here, we'll validating the response code 200, verifying the body has a tag data. Verifying the response based on debt equal to two, and records per page is equal to six. These are the four conditions, what we are verifying the response if at all anything is wrong. For example, let's say I do hear one. I'm verifying it for the PS1 credit perimeter, I attended query parameter to one and let's see and run it and what is happening. So it's still, we're getting a response. Status code of 200 is received. The response body, it has the data that see body, body has datatype. Third, test, verify pit. So what here we are verifying the p should be equal to 2. Second piece because parameter or second Pythia beta equal to one. And this, because of this reason this test is failing. And number of records per page here also the number of records but pay the six. So this test is passing. Now, if I make it as 2m requesting it for page two, then what is going to happen? All the tests they are passing. So this is the way we execute the test. We define our testing Postman and then executed. So in a similar fashion, we are going to execute the adder for test what we have discussed in a previous part. So again, I go ahead and create a new request. So this will also be a part of new collection I added. And then I take this one for returning a single user. This is also a good EPA quit HTTP request and MPA query. So I'm trying to get it for user ID surveyed and get, trying to get the data for user ID equal to seven and I send it. We have Michael Lawson who notice the term liberal over here and now deserve our test for this scenario. So I am taking this test and we go to the test section. And we pasted what exactly are we doing over here? We are again, we're elevating the status code. If the sponsors giving them electrics successfully, the request is processed successfully. The response curve should be equal to 200, which is here, validating the response body respond. But it should have tag data, it is fine. And then pass the response body and then verify the firstName. So if we're trying to verify the first name, the first name should be equal to Michael and verify the last name, the last name from the response data lastName. So in the response you have data and data. Inside data you have this last name tag, which should be equal to Lawson. So these are the four test what we are doing over here. And we send the request again. You see all the tests they are passing. Let say if the status code we are expecting a different district screwed, let say two 0-1 or the name is changed to, let's say I removed a character E. Similarly from lastname, I removed the character o. And now when we try to execute this test, so we are receiving a response which is not matching to the expected response and held all this test, they are failing. So we are expecting a response where as the actual response to see if it is not matching to the expected one. And hence, these tests are failing. See the status could we're getting 200, we're expecting to 0. And similarly, we want to verify the FirstName. And firstname has c, a, t, e was missing. You see? Michael and Michael. So it was not many similarity lastName law or is missing. And here we have Lawson. So I put it as lastname and say port one more character over here and all. And we tied to execute it again and see what happens. See, again, we have one test failing, which is status could, because I haven't seen this data School is to get good should be equal to 200 for the successful execution and then see all the tests, not their past m. So in this way, we write in the test and verify whether the test, they're working fine or not. If in case they're not working fine, there should be a failure and that should be reported here in the test results. Similarly, we'll go ahead and do the checklist. So I'm creating one more diffused. This is my list. This is for creating, and this time we're using post aesthetically method not appeared a new record. Go here and amp selecting post is in this one, putting the request. And then it should have a body as well. I guess you need to have some information in the body. So we have to have this information, the body as well. We collect this information, the data, what we want to write. We go to the body and here since it is none, I cannot best selected row. And I'm putting the data over here and then sending it. I designated is 343. And it has a created at times temp equal to this. Now there should be a test for that. You have created a test for this. You also want to execute those tests. So we go here, click here, and we have this test. So we go here and we are these tests. Now, was this tests are added. We need to check what exactly is happening with it. Now says this data has been created. I don't think this data will be created again. So what I'll do, I'll change this name instead of morphous. They'll make it morphous. An estimator of leaders. I'll make this lead. And let's see what is happening. When I send this request. New ideas created with this 42 and timestamp. And the see the tests. We have test for validation of the status quo, which is 201. In this case the status is 201 that is modified. And then it has ID and it has timestamp. It is fine. Validity in response party. It should have ID validity in this body. We should have created. It is fine. Now we are going to use in the record has been created. And the IRB which is used is 42. Using this same idea, we are willing to edit and further reading, we need to use the HTTP method. It is. Put it, go ahead again with the new request first. And here we're going to select the method. It is put and derivates first used is 42. So we're going to use the same idea that here it is, 42, user ID should be same and then we want to edit it. In order to get it, we need to use a user data. It should be something like this. It will to the body. Again, we select row and then we paste. Not the name is changed to Morpheus and job two, Xeon decedent, and then it should have tested as well. So these are the tests which we are going to use. We invented the status code. The status quote after the addition should be 200 and then the The response body should have a new tag updated at. So let's see what happens. As soon as we send this request, we see request has this data scored, the response code, which is 200 and then updated. The app is seen in the response body. Now let us see the test. What are the test results? Validating the status code, which is 200, and validating the response body sensor Time.deltaTime. So it is also what confined. Now we want to delete the record. In order to delete the record, we have to use the request, which is like something like this. Let's create an authentic place for deleting. And how are we going to do that? From the SCTP mattered for we're going to use the delete method. This is the third, and this is the query. But here the user ID, what we have to use is 42. We want to record the user ID equal to 42. Plus we have to have certain kind of test for this. So the test, what we are using over here is to validate the response code. So the response should be to 0 for the response curve should be equal to 0 for after the successful condition, the response would be to 0-4. No. We are going to send this request. As soon as the request is sent. You see this bar squared is equal to 204 and test result is passed. Now if you're going to query some thing like query a user with the user ID equal to 42, the one-word recreated rate, 42. If you want to quit it. Clearly diseases See what is willing to come and see. Because this is there is no longer existing in the database, so you can not retrieve it. One more thing I forgot to tell you that we have to save this request. Same thing with the second 1, third, fourth, save, and last one, save. So again, you see, then you save it. The method at least they were shown as good, good, good. The HTP request types rate methods, the methods which we have shown earlier, now they have changed to the actual one. So initially we have this request, get secondary questions also get request target quest in the post request. Third was photobleaching a PUT request, and last one was for deleting and it was a delete request. Now I'll also give you an example of how to do parameterization or how to set global renewables not to set a variable. What you need to do is to sleep this one. The parameter and flick your onset video been set variable as host. I'm sitting in union and it is the environment variable. But if you want, you can set it as the global renewable settlers host. If you go here, you see it's a global variable. Across all detest. This host will be applicable. I'm here and I'm sending it is where I go. Yeah. So instead of this, I am using host. All you need to do is go to this, any other query where you have same thing, the same variable being used. Use host Institute of that variable and saying the query, you see it is working fine. So this way, you can set parameters, you can set the environment variables, you can set global variables and then use them in your test. With this, we come to the end of this part. And now I believe you know how to write test, how to define your test, and how to execute them using Postman. So now you are aware of how exactly you can clear test and you can define your test and how to verify the status code HOTPO install postman, execute your test using postman, set the environment and global variables and verified that a third. So in the next part we'll talk about new men, which is used for the executing your test in an automated way. So friends see you in the next part. 10. API Test Automation using NEWMAN: Hello friends. Welcome to the last part of this course. And in this part we're going to talk about EPA test automation using new man. New men is a liability through which you can automate the test run of all the requests, what you have created in a collection of postmen. So you don't have to launch the application and run the request one-by-one and terracotta response. Once you have your first created in postmen, you can save the collection and donated link for that collection and venue. Good, this link as input to the middlemen library and executed using command lines. So all the tests which are there in the collection they had executed, automatically reported, generated. This is a technique to automate APA test cases in postmen via Newman. And in this part we are going to see how exactly we can achieve that. For that you need to install new men first. And in order to install new men, you should have node.js installed on your system. In order to install Node.js, You have to go to the node.js site and download the version which you need for your system are taking 15.6 dot 0. You can take any resonance but you need. And then as soon as you launch the installers, you get this option. Click on Next. Next. It will be installed in the program files if we want to change it to any other location, feel free to do so. And then by default, option selected, I'm also clicking the automatically installed the necessary tools. And then finally, after clicking Next, I get onto this screen where it says install and clicking on installing kids getting stalled. D1 Node.js to make tinges? Yes. And you can see that in order to establish an is complete and we have our system and stored here. And now Utopian at the command line. Like here, just to continue, continue. Thinks a more installations. It will go ahead and make some additions to your environment variable. Also, if Python is not installed on the system, it'll go ahead and install the Python on your system. So it currently it is installing to not make not one on my system. All of this is occurred for running Node.js. Both we have Node.js on the system will go ahead and install the Newman library. We'll go ahead and strongly Newman leverages on the system. So you can see the astonishingly still on, it takes a few minutes for it takes a few minutes for the complete installation for them to be done. So please be patient with that. This is just onetime exercise. Once you have it, don't take this much of time. You can just run it in a single goal. Once you have the whole setup pretty, you can go ahead and execute your test cases, but just running a single command line. Now you can see the installation has been completed after few minutes, let's say for five minutes. And I'm getting a message type into to exit. So I'm hitting enter. So now we have Node.js installer node system. Post-installation, I disturb the PowerShell or the command line over here. I'll go ahead and check. And PM was done. So the current npm wasn't a cylinder for TDL also executive nor had been installed correctly. So normalization is also coming as 15, which is perfect. Post you have NPM and Node installed on the system. All you need to do is run this command, which is NPM. And Tom minus g is global for all the users. Newman, npm install minus g. Newman. And Intel certainly start to install Newman libraries on the system. So as a part of our testing, what I have done, I have renamed this collection, okay, as testing skill shares. And now after renaming, I'm going to download this. So in order to download what we have to do, click on this tree dot, and here you have this option as export. Click on that collection V2 0.1. Use this as recommended rather than trying to export. And everything should be portrayed here saying would you naming it, testing skillset, postmen collection. This is the name. And see, I'm sitting at a desk top. And then we have the same. Now we have this JSON file. This one pitch has the postman collection. I will copy it to the location where I have installed new men. Newman has been stored here. And the postmen user may use rarely postmen and postpone folder, putting this decent file. And now I go to the command prompt and command prompt in the same folder. Let me increase the font size is somehow so that it will be easier for you to see it. I hope it is visible for you. So you see user PKA, post-modernity, the theme folder wherein I have saved the decent file for the collection. And now I'll take the new man which we have installed. In case you have new and not installed on the system, you can always go to the folder. When you want to storm Newman and rate this command and run it, npm install minus g Newman disciplining store Newman on the system in the same folder. Once it is, it will take this one minute installed, and once it is stored, you can take the vs minus v will give it the Virgin of Neumann installed on the system. My words than is five to two. I'll go ahead and run the JSON collection, which I have downloaded. So once Newman has been installed, you can go ahead and check the Watson. New Moon minus V will give you the version installed. So five to two is the volume within this terminal methods term. Now in this folder user PKI, me, postmen we had, we have downloaded this whole decent and saved it, will use the same folder for the executing our new man. So all you need to do is type new men run and name of the decent file. So this is the name of our recent election. I typed it and hit Enter. As soon as you hit enter, you'll see all the test which we're manually executed in postmen. All of those tests are executed automatically over here with the newline. So let's see, that's going to do it again, has to be done. So first occurs. First fifth request, first occurred has been relation 1234. Second crest has three validation folds requesters to 50% to ethics. And fifth repeaters, one whether different. So let's go and check first, second, third, fourth first. And then how exactly to the number of request, how many request past how how many assertions they call each one of these checkers assistance. So there are 11 assessments then failure scenarios, past scenarios that written is reported how many paths and the with green tech is first and the one with radius field. So in this way we get to know how many tests which are fun and failing and hominid tester there'll be surpassing. So friends. Now you can see the test, what we have created here, we had those test and for each one of them we had certain validations, something like this. This is one relation. They are also executed over there when we're running it where new men. So this is how you do manual and automated testing using Postman and new RAM for EPA's. As a part of this course, I will provide all of the test cases which we discussed in our distinct, all these test cases, what we used for our discussion. I will post them as a separate file so you can always refer them also posted tutorial for you so that you can practice all those point what you have learned in this course. In case if you have any quotient queries dork, please feel free to get in touch with me. You can always being charged me your queries or you can post your queries in a caution at the command to the coast and I'll be more than happy to reply or provide you with the answers to those questions. With this, we come to the end of this course, tiger friends. Thank you and happy learning. And you're with this. We come to the end of this course, tags a lot for your time and I look forward to hearing from you. Please feel free to get in touch with me in case if you have any questions or queries and do recommend this course to your friends, your family members, and please let me know your experience with disclose. Thank you. Happy learning.