API automation of Best Buy API Playground APIs using Python, pytest, requests & json libraries
Prerequisites:
- Python should be installed
- PIP should be installed
- IDE like PyCharm
- Best Buy API Playground App should be running locally on your system (https://github.com/BestBuy/api-playground)
Few of the APIs under Categories were automated:
i) Retrieve list of categories (GET method)
ii) Create a category (POST method)
iii) Delete a category (DELETE method)
iv) Retrieve a single category, filtering Categories with single Category id ( GET method)
Setup:
- Go to the Terminal or Command Prompt and run:
https://github.com/divanshu-netizen/api-playground-automation.git
- Run these commands to install needed packages, libraries
pip install requests
pip install pytest
pip install pytest-html
pip install jsons
- Go to the repo folder and run this command
pytest --html=report.html
this will run all the Test Cases & create a report, report.html file in the directory containing test summary which can be viewed on the browser of your choice