A practice project built in Postman and Bruno to learn and experiment with automated API testing across two modern API clients. It covers the basic CRUD lifecycle of the Restful-Booker platform, moving through creating, reading, updating, and deleting booking records while also demonstrating API test scripting, dynamic variable isolation, and automated validation workflows.
- Dual-Platform Coverage: Maintains an identical CRUD test suite in both Postman (
.jsoncollection) and Bruno (.ymlcollection), showcasing the same API tests across two different API clients. - Dynamic Variable Chaining: Automatically extracts the
bookingid,firstname, andlastnamefrom runtime responses and forwards them dynamically into downstreamGET,PUT,PATCH, andDELETErequests. - Dynamic Payload Validation (
PATCH): Implements an advanced JavaScript algorithm (Object.keys()) that dynamically iterates over and validates only the specific partial update fields sent in the request body, leaving unpatched values safely unverified. - Security Best Practices: Isolates environmental secrets (
token,basicAuth) into transient client memory variables rather than hardcoding credentials into shared source code files. - Negative Testing Coverage: Automatically fires a post-deletion
GETquery targeting the scrubbed resource ID to explicitly verify the platform natively handles record destruction with a strict404 Not Foundresponse code.
The collection runner executes requests in this precise architectural order to maintain strict data integrity:
- Ping Check: Queries
/pingto confirm the backend microservices are up, awake, and responsive. - Auth Token Generation: Logs in using administrative credentials to securely seed runtime cookies.
- Create Booking: Generates a brand-new database entry and initializes the global runtime context.
- Get Booking (Bulk): Validates bulk array properties and payload structure contracts.
- Get Booking (Filtered): Targets filtering layers to assert the created runtime record resolves via structural properties.
- Get Booking (Single): Retrieves the individual booking by ID and validates that the returned details match the created record.
- Update Booking (PUT): Fully overrides the target booking database object and matches data consistency constraints.
- Partial Update (PATCH): Modifies sparse payload data configurations using smart loop-level testing checks.
- Delete Booking: Completely terminates the runtime test object and captures structural feedback string markers.
- Verification Check: Confirms total item extraction from backend index structures.
Follow these simple steps to import and run this automated suite on your local desktop machine. Two API client suites are provided — choose Postman or Bruno below.
Clone this repository or click the Code dropdown button above to download the raw collection JSON file to your computer.
- Open your Postman Desktop Application Workspace.
- Click the Import button at the top-left of the dashboard navigation bar.
- Drag and drop the
Restful-Booker API.postman_collection.jsonfile into the UI drop zone.
Click the imported Restful-Booker API collection, go to the Variables tab, and set these values in the Current Value column:
baseUrl:https://restful-booker.herokuapp.comusername:adminpassword:password123basicAuth:Basic YWRtaW46cGFzc3dvcmQxMjM=
- Click the Three Dots
...next to the collection name. - Select Run collection.
- Verify all requests are ticked in sequential order.
- Click the blue Run Restful-Booker API button.
Clone this repository or download the Restful-Booker API - Bruno/ directory to your computer.
- Open your Bruno Desktop Application.
- Click Open Collection and navigate to the
Restful-Booker API - Bruno/folder. - Click Open — Bruno automatically loads all requests organized into Ping, Auth, and Booking folders.
Variables are pre-configured in opencollection.yml. Verify these values under the collection settings:
baseUrl:https://restful-booker.herokuapp.comusername:adminpassword:password123basicAuth:Basic YWRtaW46cGFzc3dvcmQxMjM=
- Click the Run button at the top of the Bruno window.
- Select Run Collection and confirm all requests are selected in the correct sequence.
- Click Run to execute the full CRUD lifecycle and monitor the test results in real-time.
Special thanks to the creators of the open-source tools and platforms that made this practice project possible:
- Restful-Booker API: Created by Mark Winteringham, this fantastic, free web application served as the target sandbox environment for executing all CRUD operations.
- Postman: The primary API client tool used to build, organize, debug, and run the automated test suite loops.
- Bruno: An open-source API client used as the second platform to mirror the same CRUD lifecycle with equivalent test coverage.
- Postman Console Tool: Utilized for live debugging and runtime tracking of variables and console logs.