Postman API:
- Postman is an API Development Environment that helps developers easily test and work with APIs.
- It is used for backend testing where we enter the end-point URL, send the request to the server, and receive the response back from the server.
- It provides an easy-to-use interface for developing, testing and debugging REST APIs.
- Postman also includes a comprehensive library of pre-defined requests and response objects, making it an ideal tool for quickly testing and prototyping APIs.
Request Methods:
- GET - Get requests are used to retrieve information from the given URL.
- POST - To send the new data to an API.
- PUT - This method is used to update the existing data.
- DELETE - This is used to remove or delete the existing data.
API test actions:
- Verify the correct HTTP status code.
- Verify response payload: Check valid JSON body and correct field names, types, and values - including in error responses.
- Verify response headers: HTTP server headers have implications on both security and performance.
- Verify correct application state: This is optional and applies mainly to manual testing, or when a UI or another interface can be easily inspected.
- Verify basic performance sanity: If an operation was completed successfully but took an unreasonable amount of time, the test fails.
HTTP Status Codes:
No comments:
Post a Comment