This repository contains a Python test suite for a ToDo app API here is the API documentation. The tests are written using pytest and utilize the requests library for API interactions and faker for generating fake data.
Before running the tests, ensure you have Python installed on your machine. You can set up a virtual environment and install the required dependencies using the following commands:
python -m venv venv
source venv/bin/activate # On Windows, use "venv\Scripts\activate"
pip install --upgrade pip
pip install pytest==8.0.0 pytest-html==4.1.1 faker==22.6.0 requests==2.31.0
To run the tests, execute the following command:
pytest --html=testing_results/report.html
This will run the tests and generate an HTML report in the testing_results
directory.
- pytest: A testing framework for Python.
- pytest-html: A plugin for pytest that produces an HTML report for test results.
- requests: A Python library for making HTTP requests.
- faker: A Python library for generating fake data.
After running the tests, you can view the detailed test report by opening the generated HTML file in a web browser.
The report is located at testing_results/report.html
.