Basic CRUD Operations using Pytest and Requests (https://pypi.org/project/requests/) packages in python with API server hosted locally.
To install the node server locally:
- install node.js
- Command to install the npm-server : npm install -g json-server
- Command to start the server : json-server --watch db.json #db.json will get created from the triggered location
To start the test use below command:
- To run the sanity : pytest -v -s sanity --html=reports/report.html
- To run the smoke : pytest -v -s smoke --html=reports/report.html
- To run the regression : pytest -v -s regression --html=reports/report.html
- To run all the tests : pytest -v -s --html=reports/report.html