This is a simple example of a test automation project for testing Booker broker, using Pytest, and allure for reporting. Repository have a general structure to help you organize and create frameworks from scratch.
Made by Siarhei Stamal for Python Test Automation course.
/pytest-framework
├── .github
│ ├── workflows
│ │ ├── flake8.yaml
│ │ ├── ...
├── tests
│ ├── conftest.py
│ ├── test_booking.py
├── utils
│ ├── api
│ │ ├── auth.py
│ │ ├── booking.py
│ ├── clients
│ │ ├── http
│ │ │ ├── builder.py
│ │ │ ├── client.py
│ ├── models
│ │ ├── auth.py
│ │ ├── booking.py
│ ├── validate
│ │ ├── schema.py
│ ├── assertions.py
│ ├── random_generator.py
│ ├── routes.py
├── allure-results
│ ├── *.json
│ ├── *.txt
├── .gitignore
├── pyproject.toml
├── .env
├── settings.py
├── pytest.ini
├── README.md
├── requirements.txt
└── LICENSE
- Clone this repository
$ git clone <URL>- Create virtual environment, activate it:
$ pip install virtualenv
$ cd ~/projects/pytest-framework
$ virtualenv venv
$ source venv/bin/activate- Install dependencies
$ pip install -r requirements.txt- To execute ALL tests w/ DEBUG log level
$ pytest . --log-level=DEBUG- To execute ALL API test suite
$ pytest . -m loginHow to build report
$ allure serve
or
allure generateapi - to execute all API test casesbookings - to execute test cases related to BOOKING functionality