A portfollio example of python selenium tests. I'm a big fan of Gherkin Syntax and Behave is one of my favorite tools to write BDD Tests. The feature files offer a quicker grasp of what's expected and where something stopped working, compared to to reading through all the test functions to catch up.
See products.feature or any of the other feature files, to get an idea how easy figure out what's going on. If you're unfamiliar with behaves folder structure go to the 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.
- Python 3.
- Virtualenv (
pip3 install virtualenv).
virtualenv -p python3.6 env
source env/bin/activate
./utilities/driver_update/geckodriver.sh
./utilities/driver_update/chromedriver.sh
pip3 install -U -r requirements.txtOr just run ./install.sh
behave featuresFor a prettier report checkout Allure reports with the steps below.
brew install allurebehave -f allure_behave.formatter:AllureFormatter -o utilities/allure/allure_results ./featuresallure 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