Skip to content

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.

License

Notifications You must be signed in to change notification settings

harsh-valecha/restful-booker-api-testing

Repository files navigation

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:

    git clone https://github.com/your-username/restful-booker-api-testing.git
    cd restful-booker-api-testing
  2. Create and activate a virtual environment:

    python -m venv venv
    source venv/bin/activate # On Windows, use `venv\Scripts\activate`
  3. Install the required dependencies:

    pip install -r requirements.txt
  4. To run the scripts -

    python scripts/practice_requests.py

Running Tests

To run the tests, execute the following command:

pytest test_cases/

License

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

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published