Testing REST IPA using POSTMAN Postman is a
![Testing REST IPA using POSTMAN • Postman is a powerful HTTP client for testing Testing REST IPA using POSTMAN • Postman is a powerful HTTP client for testing](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-1.jpg)
![Installing the Postman app • To install Postman, go to the https: //www. getpostman. Installing the Postman app • To install Postman, go to the https: //www. getpostman.](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-2.jpg)
![Navigating Postman provides a multi-window and multi-tab interface for you to work on APIs. Navigating Postman provides a multi-window and multi-tab interface for you to work on APIs.](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-3.jpg)
![Requests In Workspaces, you can create any kind of HTTP request. The four parts Requests In Workspaces, you can create any kind of HTTP request. The four parts](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-4.jpg)
![Responses The Postman response viewer helps to ensure the correctness of API responses. An Responses The Postman response viewer helps to ensure the correctness of API responses. An](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-5.jpg)
![How does this work? 1. Enter your request details (URL: postman-echo. com/get) in Postman, How does this work? 1. Enter your request details (URL: postman-echo. com/get) in Postman,](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-6.jpg)
![CONSIDERATIONS OF TESTING WEB SERVICE A well-constructed API test suite answers questions such as: CONSIDERATIONS OF TESTING WEB SERVICE A well-constructed API test suite answers questions such as:](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-7.jpg)
![Example of testing IPA of newbook • API documentation for newbook: http: //newbookalliance. github. Example of testing IPA of newbook • API documentation for newbook: http: //newbookalliance. github.](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-8.jpg)
![Policies for all calls • Clients should add following headers to all requests: X-Newbook-Client: Policies for all calls • Clients should add following headers to all requests: X-Newbook-Client:](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-9.jpg)
![GET list of cities [GET /cities/] GET list of cities [GET /cities/]](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-10.jpg)
![GET with parameters • A Get request can pass parameters to the server using GET with parameters • A Get request can pass parameters to the server using](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-11.jpg)
![Test scripts • With Postman you can write and run tests for each request Test scripts • With Postman you can write and run tests for each request](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-12.jpg)
![Test results • Postman runs tests every time you run a request. • Results Test results • Postman runs tests every time you run a request. • Results](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-13.jpg)
![Signin [POST /auth/signin/] • The HTTP POST request method is meant to transfer data Signin [POST /auth/signin/] • The HTTP POST request method is meant to transfer data](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-14.jpg)
![POST request structure 1. Choose POST method 2. URL is https: //stage-api. newbookmodels. com/api/v POST request structure 1. Choose POST method 2. URL is https: //stage-api. newbookmodels. com/api/v](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-15.jpg)
![Response • The response returns us "token" (unique key) for clients account. • In Response • The response returns us "token" (unique key) for clients account. • In](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-16.jpg)
![Get self data [GET /client/self/] • URL: https: //stage-api. newbookmodels. com/api/v 1/client/self/ • For Get self data [GET /client/self/] • URL: https: //stage-api. newbookmodels. com/api/v 1/client/self/ • For](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-17.jpg)
![Request structure • URL: https: //stage-api. newbookmodels. com/api/v 1/client/self/ • For authorization will use Request structure • URL: https: //stage-api. newbookmodels. com/api/v 1/client/self/ • For authorization will use](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-18.jpg)
![Update self user data [PATCH /client/self/] • URL: https: //stage-api. newbookmodels. com/api/v 1/client/self/ • Update self user data [PATCH /client/self/] • URL: https: //stage-api. newbookmodels. com/api/v 1/client/self/ •](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-19.jpg)
![Request structure • URL: https: //stage-api. newbookmodels. com/api/v 1/client/self/ • For authorization will use Request structure • URL: https: //stage-api. newbookmodels. com/api/v 1/client/self/ • For authorization will use](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-20.jpg)
![Response Response](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-21.jpg)
![Variables • Variables allow you to reuse values in multiple places so you can Variables • Variables allow you to reuse values in multiple places so you can](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-22.jpg)
![Add variables Add variables](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-23.jpg)
![Add variables • In the table we providing variable name and value. • After Add variables • In the table we providing variable name and value. • After](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-24.jpg)
![Use variables • Variables inside the Postman UI are enclosed inside curly braces. Use variables • Variables inside the Postman UI are enclosed inside curly braces.](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-25.jpg)
![Links for more information • https: //www. getpostman. com/docs/v 6/ • https: //docs. postman-echo. Links for more information • https: //www. getpostman. com/docs/v 6/ • https: //docs. postman-echo.](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-26.jpg)
![TYPES OF HTTP REQUESTS • GET – Retrieves the data from a specified source TYPES OF HTTP REQUESTS • GET – Retrieves the data from a specified source](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-27.jpg)
![HTTP STATUS CODE • 1 XX- Codes between 100 -199 mean that the server HTTP STATUS CODE • 1 XX- Codes between 100 -199 mean that the server](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-28.jpg)
- Slides: 28
![Testing REST IPA using POSTMAN Postman is a powerful HTTP client for testing Testing REST IPA using POSTMAN • Postman is a powerful HTTP client for testing](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-1.jpg)
Testing REST IPA using POSTMAN • Postman is a powerful HTTP client for testing web services. Created by Abhinav Asthana, a programmer and designer based in Bangalore, India, Postman makes it easy to test, develop and document APIs by allowing users to quickly put together both simple and complex HTTP requests. • Postman is available as a native app for Mac, Windows, and Linux operating systems.
![Installing the Postman app To install Postman go to the https www getpostman Installing the Postman app • To install Postman, go to the https: //www. getpostman.](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-2.jpg)
Installing the Postman app • To install Postman, go to the https: //www. getpostman. com/apps • Click Download for Mac / Windows / Linux depending on your platform. • mac. OS installation • Once you’ve downloaded app, you can drag the file to the “Applications” folder. Double click on Postman to open the application. • Windows installation • Download the setup file • Run the installer
![Navigating Postman provides a multiwindow and multitab interface for you to work on APIs Navigating Postman provides a multi-window and multi-tab interface for you to work on APIs.](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-3.jpg)
Navigating Postman provides a multi-window and multi-tab interface for you to work on APIs. This interface design gives you as much space as possible for your APIs.
![Requests In Workspaces you can create any kind of HTTP request The four parts Requests In Workspaces, you can create any kind of HTTP request. The four parts](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-4.jpg)
Requests In Workspaces, you can create any kind of HTTP request. The four parts of an HTTP request are the URL, method, headers, and the body.
![Responses The Postman response viewer helps to ensure the correctness of API responses An Responses The Postman response viewer helps to ensure the correctness of API responses. An](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-5.jpg)
Responses The Postman response viewer helps to ensure the correctness of API responses. An API response consists of the body, headers, and the status code.
![How does this work 1 Enter your request details URL postmanecho comget in Postman How does this work? 1. Enter your request details (URL: postman-echo. com/get) in Postman,](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-6.jpg)
How does this work? 1. Enter your request details (URL: postman-echo. com/get) in Postman, and hit the Send button. 2. The request is received by the API server (postman-echo. com), and it returns a response. 3. The response is received by Postman, and the response is visualized in the interface.
![CONSIDERATIONS OF TESTING WEB SERVICE A wellconstructed API test suite answers questions such as CONSIDERATIONS OF TESTING WEB SERVICE A well-constructed API test suite answers questions such as:](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-7.jpg)
CONSIDERATIONS OF TESTING WEB SERVICE A well-constructed API test suite answers questions such as: • Does the service respond quickly enough for the intended users? • Will the server respond with the correct values? (Positive Testing) • How will the service handle exceptions and illegal values? (Negative Testing) • Is the service stable under expected and unexpected user loads? (JMETER, Load. Runner)
![Example of testing IPA of newbook API documentation for newbook http newbookalliance github Example of testing IPA of newbook • API documentation for newbook: http: //newbookalliance. github.](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-8.jpg)
Example of testing IPA of newbook • API documentation for newbook: http: //newbookalliance. github. io/API/ • Base URL: https: //stage-api. newbookmodels. com
![Policies for all calls Clients should add following headers to all requests XNewbookClient Policies for all calls • Clients should add following headers to all requests: X-Newbook-Client:](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-9.jpg)
Policies for all calls • Clients should add following headers to all requests: X-Newbook-Client: '<client>' X-Newbook-Version: '<version>' • API supports content negotiation Via Accept header: Accept: application/json • Authorization API uses token-based authorization via Authorization header: authorization: '<token>‘ • API Versioning API uses url-path versioning. That means, you have to add version prefix (e. g. /api/v 1/) to each API url.
![GET list of cities GET cities GET list of cities [GET /cities/]](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-10.jpg)
GET list of cities [GET /cities/]
![GET with parameters A Get request can pass parameters to the server using GET with parameters • A Get request can pass parameters to the server using](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-11.jpg)
GET with parameters • A Get request can pass parameters to the server using "Query String Parameters". • For example, in the following request, https: //stage-api. newbookmodels. com/api/v 1/cities/? name=Miami the parameter “name" has the value “Miami".
![Test scripts With Postman you can write and run tests for each request Test scripts • With Postman you can write and run tests for each request](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-12.jpg)
Test scripts • With Postman you can write and run tests for each request using the Java. Script language. • A Postman test is essentially Java. Script code executed after the request is sent, allowing access to the pm. response object.
![Test results Postman runs tests every time you run a request Results Test results • Postman runs tests every time you run a request. • Results](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-13.jpg)
Test results • Postman runs tests every time you run a request. • Results are displayed in a Tests tab under the response viewer. The tab header shows how many tests passed, and the test results are listed here. If the test evaluates to true, the test passed.
![Signin POST authsignin The HTTP POST request method is meant to transfer data Signin [POST /auth/signin/] • The HTTP POST request method is meant to transfer data](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-14.jpg)
Signin [POST /auth/signin/] • The HTTP POST request method is meant to transfer data to a server (and elicit a response). What data is returned depends on the implementation of the server. • To send POST request we need: URL: https: //stage-api. newbookmodels. com/api/v 1/auth/signin/ Body: example of request body provided in documentation { "email": "a@a. aa", "password": "qwer 1234" }
![POST request structure 1 Choose POST method 2 URL is https stageapi newbookmodels comapiv POST request structure 1. Choose POST method 2. URL is https: //stage-api. newbookmodels. com/api/v](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-15.jpg)
POST request structure 1. Choose POST method 2. URL is https: //stage-api. newbookmodels. com/api/v 1/auth/signin/ 3. Go to “Body” tab to configure body 4 and 5 configure content-type. 6. Body in json format
![Response The response returns us token unique key for clients account In Response • The response returns us "token" (unique key) for clients account. • In](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-16.jpg)
Response • The response returns us "token" (unique key) for clients account. • In all clients requests(Permissions: Is. Client), we have to assign token to the header.
![Get self data GET clientself URL https stageapi newbookmodels comapiv 1clientself For Get self data [GET /client/self/] • URL: https: //stage-api. newbookmodels. com/api/v 1/client/self/ • For](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-17.jpg)
Get self data [GET /client/self/] • URL: https: //stage-api. newbookmodels. com/api/v 1/client/self/ • For authorization will use token generated from Signin request.
![Request structure URL https stageapi newbookmodels comapiv 1clientself For authorization will use Request structure • URL: https: //stage-api. newbookmodels. com/api/v 1/client/self/ • For authorization will use](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-18.jpg)
Request structure • URL: https: //stage-api. newbookmodels. com/api/v 1/client/self/ • For authorization will use token generated from Signin request. • Response return information about client account
![Update self user data PATCH clientself URL https stageapi newbookmodels comapiv 1clientself Update self user data [PATCH /client/self/] • URL: https: //stage-api. newbookmodels. com/api/v 1/client/self/ •](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-19.jpg)
Update self user data [PATCH /client/self/] • URL: https: //stage-api. newbookmodels. com/api/v 1/client/self/ • For authorization will use token generated from Signin request.
![Request structure URL https stageapi newbookmodels comapiv 1clientself For authorization will use Request structure • URL: https: //stage-api. newbookmodels. com/api/v 1/client/self/ • For authorization will use](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-20.jpg)
Request structure • URL: https: //stage-api. newbookmodels. com/api/v 1/client/self/ • For authorization will use token generated from Signin request.
![Response Response](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-21.jpg)
Response
![Variables Variables allow you to reuse values in multiple places so you can Variables • Variables allow you to reuse values in multiple places so you can](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-22.jpg)
Variables • Variables allow you to reuse values in multiple places so you can keep your code DRY (Don’t Repeat Yourself). • Also, if you want to change the value, you can change the variable once with the impact cascading through the rest of your code. • Variables can be used in the following form in the Postman user interface {{variable. Name}}. • The string {{variable. Name}} will be replaced with its corresponding value when Postman resolves the variable. • For example, for an environment variable url with the value http: //localhost , you will have to use {{url}} in the request URL field.
![Add variables Add variables](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-23.jpg)
Add variables
![Add variables In the table we providing variable name and value After Add variables • In the table we providing variable name and value. • After](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-24.jpg)
Add variables • In the table we providing variable name and value. • After that click save and close the window.
![Use variables Variables inside the Postman UI are enclosed inside curly braces Use variables • Variables inside the Postman UI are enclosed inside curly braces.](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-25.jpg)
Use variables • Variables inside the Postman UI are enclosed inside curly braces.
![Links for more information https www getpostman comdocsv 6 https docs postmanecho Links for more information • https: //www. getpostman. com/docs/v 6/ • https: //docs. postman-echo.](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-26.jpg)
Links for more information • https: //www. getpostman. com/docs/v 6/ • https: //docs. postman-echo. com/
![TYPES OF HTTP REQUESTS GET Retrieves the data from a specified source TYPES OF HTTP REQUESTS • GET – Retrieves the data from a specified source](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-27.jpg)
TYPES OF HTTP REQUESTS • GET – Retrieves the data from a specified source • POST- Sends new data to a specified source • PATCH- Updates info for a specified source • DELETE- Removes data from a specified source
![HTTP STATUS CODE 1 XX Codes between 100 199 mean that the server HTTP STATUS CODE • 1 XX- Codes between 100 -199 mean that the server](https://slidetodoc.com/presentation_image_h/894836f80049087330ca45eab96f6451/image-28.jpg)
HTTP STATUS CODE • 1 XX- Codes between 100 -199 mean that the server is working on the request. Not so common • 2 XX- Codes between 200 -299 mean that the request was successful. • 3 XX- Codes between 300 -399 mean that the request was not performed. • 4 XX- Codes between 400 -499 mean that the request is incomplete and may need more info • 5 XX- Codes between 500 -599 mean that the server encountered an error.
Newbookmodels
Rest seat on canine
Rest and rest seat
Stephen greenblatt hamlet
Rests and rest seats
Object at rest stays at rest
Chinese postman problem
Neil postman
Neil postman
Neil postman five things
Underwood and postman 1960
Subjects and predicates quiz
What belief does postman hold about television
Chinese postman problem
Connector problem in graph theory
What is domain
Logic based testing in software testing
Du path testing
Positive negative testing
Cs3250
What is globalization testing
Neighborhood integration testing
What is testing
Control structure testing in software testing
Decision table testing in software testing
What is decision table testing
Error yang dapat diketahui dari pengujian black box adalah
Behavior testing adalah
Decision tables testing