This repository contains the base setup project for testing an API, using Python and Behave.
Spotify API is used as Example
- Python 3.10.X
- pip and setuptools
- venv (recommended)
- Download or clone the repository
- Open a terminal
- Go to the project root directory.
- Create a virtual environment:
py -m venv venv
- Activate the virtual environment executing the following script:
.\venv\Scripts\activate
- Execute the following command to download the necessary libraries:
pip install -r requirements.txt
- Setup the Spotify OAuth Token in the "token" variable in "/features/steps/request_steps.py" file.
- Open a terminal
- From the project root directory run:
behave -f html -o results/behave-report.html
- A result file (behave-report.html) will be generated in the "/results" folder