API Testing Using POSTMAN
API Testing Using POSTMAN
The API Testing is performed for the application, which has a collection of API that must be tested. API calls verify functionality and expose failure
of application.
API testing is strongly connected with Back-end/Database testing, you may have brief knowledge of SQL queries. (That would be an advantage )
For API testing, you may not aware about GUI of application. So DB is only the way to cross-check, you are doing right or wrong.
(As we cross-check with database, if you know basic sql queries ( SELECT, UPDATE, ALTER, DELETE ) that would be advantage to use
POSTMAN, you can refer http://www.w3schools.com/sql/ it)
API Architecture
1. HTTP headers
2. HTTP Request (POST,GET,PUT,DELETE )
3. Status Code/ Response Code
Apart from this your application collection include many things if it required to test in you application.
1. HTTP headers - HTTP headers are always depended on your application, Mainly two:
1. Authorization - A token included with requests to identify the requester. This header has to be included in all requests
other than the login request.
2. Content-Type - A standard MIME type describes the format of object data.
Content type in most of the requests and responses will be application/json.
2. HTTP Request - There are mainly four request, which we used frequently: DATA =
1. POST - Create Or Update data
2. PUT - Update data
3. GET - Retrieve data
4. DELETE Delete data
3. Status Code/Response Code - There are many status/response code, from them we can verify the response.
1. 200 - OK, The request was successful.
2. 201 - Created, The request was successful and data was created.
3. 204 - No Content, The response is empty.
4. 400 - Bad Request, The request could not be understood or was missing required parameters.
5. 401 Unauthorized, Authentication failed or user does not have permissions for the requested operation.
6. 403 - Forbidden, Access denied.
7. 404 - Not Found, Data was not found.
8. 405 - Method Not Allowed, Requested method is not supported for the specified resource.
9. 500 - Internal Server Error.
10. 503 - Service Unavailable, The service is temporary unavailable.
Example : If want to check on local env. , Dev env. OR QA env. Even you can set accordingly your various projects as well.
Https://8081:lmdemo/group_1/api
Name Of Environment = QA
Whenever, I want to use this environment, I just select QA from top corner.
Add Collection:
You can add Each API call in collection and create a collection.