This project contains a fully automated test suite covering all endpoints of the Restful Booker API. Tests are written following the BDD (Behavior Driven Development) approach using Gherkin syntax, making them readable by both technical and non-technical stakeholders.
| Method | Endpoint | Description |
|---|---|---|
POST |
/auth |
Generate authentication token |
GET |
/booking |
Get all booking IDs |
GET |
/booking/:id |
Get a single booking |
POST |
/booking |
Create a new booking |
PUT |
/booking/:id |
Full update of a booking |
PATCH |
/booking/:id |
Partial update of a booking |
DELETE |
/booking/:id |
Delete a booking |
| Technology | Version | Purpose |
|---|---|---|
| Python | 3.11+ | Core programming language |
| Robot Framework | 7.0 | Test automation framework |
| robotframework-requests | 0.9.7 | HTTP request library |
| Cucumber / Gherkin | BDD | Scenario definition language |
- Python 3.11+
- pip
# 1. Clone the repository
git clone https://github.com/your-username/restful-booker-robot-tests.git
cd restful-booker-robot-tests
# 2. Create a virtual environment (recommended)
python -m venv venv
venv\Scripts\activate # Windows
# 3. Install dependencies
pip install -r requirements.txtrobotframework==7.0
robotframework-requests
robotframework-seleniumlibrary
selenium
webdriver-managerrobot -d results tests/robot -d reports tests/booking/create_booking_tests.robotrobot -d results --variable features/create_booking.feature*** Settings ***
Resource ../step-definition/booking.step.robot
Suite Setup the API service is available at the configured url
*** Test Cases ***
Scenario: Create a new booking and verify the details
[Tags] Regression
[Documentation] Create a new booking and verify the details
Given the API service is available at the configured url
When the user creates a booking with the following details
... John Wick 500 true 2026-05-01 2026-05-10
Then the response status code should be 200
And the created booking should have the firstname "John"
And the API responds with a status code "200"
Scenario: Get all bookings and verify the list
[Tags] Regression
[Documentation] Get all bookings and verify the list is not empty
When the user requests all bookings
Then the response status code should be 200
And the booking list should not be empty- Successful pipeline execution screenshot:
- This shows that the tests were executed successfully within the GitLab pipeline and passed the sanity frontend stage.

After running the tests, the following reports are generated in the results/ folder:
| File | Description |
|---|---|
report.html |
High-level test summary report |
log.html |
Detailed step-by-step execution log |
output.xml |
XML output for CI/CD integration |
This project is licensed under the MIT License. See the LICENSE file for details.