This project demonstrates a comprehensive automated testing strategy for the Restful Booker API, utilizing Postman and JavaScript.
- Validate full CRUD lifecycles (Create, Read, Update, Delete).
- Implement security and authentication tests using Bearer Tokens.
- Demonstrate advanced Environment Variable management and Request Chaining.
- Execute Negative Testing and Edge Cases to ensure API resilience.
- Postman (Web App)
- JavaScript (Validation and automation scripts)
- JSON Schema (Data structure and contract validation)
- Auth: Dynamic generation of access tokens.
- Happy Path: Successful flow for creating, fetching, and editing bookings.
- Negative Testing: Validation of 401 (Unauthorized), 403 (Forbidden), and 404 (Not Found) error codes.
- Edge Cases: Testing for date logic, character limits, and basic script injection.
- Clone this repository.
- Import the file
collections/restful-booker-collection.jsoninto Postman. - Import the file
environments/restful-booker-env.json. - Ensure the Environment is selected in the top-right corner.
- Click the Run button on the collection to execute all tests automatically.
- Contract Testing: Implemented JSON Schema validations to ensure every response complies with the API's data contract.
- Automation: Automated the extraction of
bookingid, eliminating the need for manual data entry between requests. - Logic Vulnerabilities: Documented date handling inconsistencies (Edge Cases) where the API allows a checkout date prior to the checkin date.