python 3.x.x
- Install Visual Studio Code (or any editor)
https://code.visualstudio.com/download
- Install Python 3.x.x (latest)
https://www.python.org/downloads/
- Create a project in vscode, open the terminal
git clone https://github.com/automationExamples/pytest-api-example.git
pip install requests pytest pyhamcrest jsonschema pytest-html flask_restx flaskPython, Pylance, autopep8
- You'll need to open two terminal instances, one for the local server, one to run pytest
python app.py- Once it is running, you can access the SwaggerUI in a browser via http://localhost:5000 OR http://127.0.0.1:5000
- To run the test, use the following command. When the tests complete, a 'report.html' is generated
pytest -v --html=report.html- It is not expected that you complete every task, however, please give your best effort
- You will be scored based on your ability to complete the following tasks:
- Install and setup this repository on your personal computer
- Complete the automation tasks listed below
- Extend and fix the 3 tests from test_pet.py. There are TODO instructions for each test listed in the file
- Create the PATCH test for test_store.py. There are TODO instructions for test along with optional tasks
- Take note of any bugs you may have found