- Python
- Pytest
- Requests
- Faker
- Python 3 or higher must be installed (Version 3 preferred) Python download page
- Pytest must be installed Pytest download,
.
├── README.md
├── config
│ ├── base_config.py
│ └── service
│ └── service_config.py
├── conftest.py
├── model
│ └── product.py
├── output
│ ├── assets
│ │ └── style.css
│ └── report.html
├── pytest.ini
├── requirements.txt
├── service
│ ├── carts
│ │ └── carts_service.py
│ └── products
│ └── products_service.py
├── tests
│ ├── test_customer.py
│ └── test_products.py
└── utils
├── api
│ ├── api_commons.py
│ └── api_utils.py
├── assertion
│ └── assertion.py
└── data
└── data_generator.py
Conditions are requested when naming. Names should be short and meaningful.
directory names = my_directory (snake case)
variable name = my_variable (snake case)
method name = my_method (snake case)
class name = MyClass (Pascal case)
tag name = @MyTag (Pascal case)
Python CLI command to run tests.
execution tests :
python3 -m pytest
execution tests via specific test file
python3 -m pytest 'file path'
execution tests via marks
@pytest.mark.smoke should be added in the test case
pytest -v -m smoke
execution tests via parallel
python3 -m pytest -n 4