This is a Keyword-driven API automation testing framework that is built on top of Pytest. It is built by following Page Object Model design pattern to make a modular test framework.
This framework test cases are for functional testing, and there are positive (happy) and negative (sad) testing path for each API endpoint.
This program uses python 3.10.0, however the minimum requirement for Pytest is Python 3.7. so, it can be downloaded from Python website.
If using the same python version, the Pytest and requests libraries can be installed with this command:
C:\{Your Directory}\TestDir>python -m pip install requirements.txtClone the repo with Git to your desired local machine directory:
git clone [url] The program_runner.py file will run all the test cases inside the test_cases folder by running this command:
python program_runner.py You could also select whether you want to run positive (happy) or negative (sad) test cases in the test_cases folder by adding -t option while running the program_runner.py file. Here is the example:
python program_runner.py -t positive Note: the argument is only positive or negative. Other will be rejected.
You could find the API documentation below: Simple-Book-Api