This repository code is part of the Homework Challenge of Empathy Talent selection process.
Language: Python
Test Framework:
Most Relevant Libraries/Modules:
Website being tested: https://www.saucedemo.com/
APIs being tested:
- https://rapidapi.com/weatherapi/api/weatherapi-com/
- https://rapidapi.com/googlecloud/api/google-translate1
All used libraries and their version can be checked on the requirements.txt
file.
To properly run the test code, some programs needs to be installed.
Clone the project
git clone https://github.com/gbl3/qa-challenge-et.git
Go to the project directory
cd qa-challenge-et
To install the requirements, you have two options:
First (recommended) is to create a virtualenv
python -m venv .
Activate the virtualenv (Note: this runs different depending on your OS)
For Windows PowerShell:
venv\Scripts\Activate.ps1
For Windows cmd:
venv\Scripts\activate.bat
For Linux/MacOs:
source venv/Scripts/activate
Install the requirements
pip install -r requirements.txt
Second option would be to directly run the previous command. The problem with that is that you are going to install the requirements globally on your computer, which might break something for your other projects. That's why I recommend going with the virtualenv option.
Before going forward, make sure you have the requirements installed and virtualenv activated. To run the frontend tests, simply type on the project root:
behave
For the api tests, you have to move to the api
folder:
cd api
Once you are already on the api
folder run the following:
pytest .\test-google-translate-api.py .\test-weather-api.py
If an error occurs, please try the setup part again. To deactivate the virtual environment, simply type:
deactivate