A portfollio example of API Tests using
See feature files for what I'm testing and steps directory for code samples.
I used a variety of differing selectors, interaction methods & waits to demonstrate my knowledge of selenium. I chose to write the tests against a saucelabs demo site to minimize maintenace.
virtualenv -p python3.11 env
source env/bin/activate
pip3 install -U -r requirements.txt
docker pull swaggerapi/petstore3:unstable
To have an API To test against I'm using Swaggers Pets Stor API. So in a terminal tab, run petsore.
docker run --name swaggerapi-petstore3 -d -p 8080:8080 swaggerapi/petstore3:unstable
Then to run the tests:
behave features
For a prettier report checkout Allure reports with the steps below.
brew install allure
behave -f allure_behave.formatter:AllureFormatter -o utilities/allure/allure_results ./features
allure generate utilities/allure/allure_results/ -o utilities/allure/allure-reports/ --clean
allure open utilities/allure/allure-reports/
If you want a History section next time you run, you need to copy the history from the previous report, before generating the next report.
rm -R utilities/allure/allure_results/*
cp -R utilities/allure/allure-reports/history/ utilities/allure/allure_results/history