Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/harsh-valecha/restful-booker-api-testing

Developed a robust automated testing framework for the RESTful Booker API using pytest and requests, incorporating data-driven testing and pytest-html for comprehensive test coverage and detailed reporting.
https://github.com/harsh-valecha/restful-booker-api-testing

api api-testing postman pytest pytest-html python requests

Last synced: about 2 months ago
JSON representation

Developed a robust automated testing framework for the RESTful Booker API using pytest and requests, incorporating data-driven testing and pytest-html for comprehensive test coverage and detailed reporting.

Awesome Lists containing this project

README

        

# RESTful-booker-api-testing
Built a robust automated testing framework for the RESTful Booker API using pytest and requests, employing data-driven testing and pytest-html for detailed reporting and enhanced test coverage.

Link :-https://restful-booker.herokuapp.com/

File Structure

```
restful-booker-api-testing/

├── test_cases/
│ ├── __init__.py
│ ├── test_create_booking.py
│ └── ... (other test case files)

├── scripts/
│ └── practice_requests.py

├── reports/
│ └── report.html

├── pytest.ini
├── conftest.py
├── LICENSE
└── README.md

```

- `collections/`: Contains the Postman collection for the RESTful Booker API.
- `test_cases/`: Contains the automated test scripts for various API endpoints.
- `reports/`: Contains the test reports generated after running the tests.
- `scripts/`: Contains examples of how to use the requests library to interact with the RESTful Booker API.
- `README.md`: Project documentation and instructions.
- `requirements.txt`: List of dependencies required for running the tests.
- `.gitignore`: Specifies files and directories to be ignored by Git.

## Setup Instructions

1. Clone the repository:

```bash
git clone https://github.com/your-username/restful-booker-api-testing.git
cd restful-booker-api-testing
```

2. Create and activate a virtual environment:

```bash
python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
```

3. Install the required dependencies:

```bash
pip install -r requirements.txt
```
4. To run the scripts -
```bash
python scripts/practice_requests.py
```

## Running Tests

To run the tests, execute the following command:

```bash
pytest test_cases/
```

## License

This project is licensed under the MIT License. See the LICENSE file for details.