Test the key functionalities of the Restful-Booker API using Postman. Provide a concise report summarizing your approach, identified issues, and suggestions for improvement.
Instructions:
Familiarize yourself with the API documentation: . Ensure you have Postman installed. Test Scenarios
Create a Postman collection and test the following scenarios: Scenario 1: Authentication and Booking Update
POST /auth (for authentication) PUT /booking/{id} (for updating a booking) Request for Authentication: {
"username": "admin",
"password": "password123"
}
Update Request Example:
Update a booking (e.g., change the first name or price). Verify that the authentication returns a valid token. Use the token to update an existing booking and confirm the changes. Test with an invalid token or unauthorized access and verify the responses. Scenario 2: Retrieve Booking List
Parameters: Test without parameters and with query parameters firstname and lastname. Verify that the response contains valid data. Test different combinations of query parameters, including invalid values. Scenario 3: Create a New Booking
{
"firstname": "Jane",
"lastname": "Doe",
"totalprice": 200,
"depositpaid": false,
"bookingdates": {
"checkin": "2024-12-15",
"checkout": "2024-12-20"
},
"additionalneeds": "Dinner"
}
Create a new booking and verify the response contains correct data. Test with missing or invalid attributes (e.g., missing firstname or invalid checkin format). Bonus Task: Assertions in Postman
Add assertions to your tests, such as: HTTP status codes (e.g., 200, 201, 400). Presence of key attributes (e.g., firstname, lastname, totalprice). Correct date format (YYYY-MM-DD for checkin). Include a sample Postman script in your report. Submission Instructions:
Export the collection in JSON format and attach it to your submission. Provide a concise document containing: A list of tested scenarios. Identified issues or inconsistencies. Suggestions for improving the API (optional). Package all materials (Postman collection, report) into a ZIP file and submit it via email to or upload it to a shared drive and share the link.