This is a test-ware to evaluate the Pytest automation tool with Python and requests library.
In order to execute the implemented test cases, an account is needed on the https://www.themoviedb.org/. If the account is created the API Key (v3 auth) should be added to the constants instead of the {YOUR_API_KEY} as a string.
- Python 3.8+
- Pip
- pytest 6.1.2
- requests 2.25.0
Framework | Documentation |
---|---|
pytest | pytest is a framework that makes building simple and scalable tests easy. |
requests | Requests is a simple, yet elegant HTTP library. |
The implemented test cases can be found in API.md.
pip install -r requirements.txt
To execute all the test cases:
pytest
To execute one test module:
pytest test/test_get.py::TestGetMethod
To execute one test function:
pytest test/test_get.py::TestGetMethod::test_get_status_code
To log the information during the execution, the following command can be used:
pytest --log-level=INFO -s