This is the simple automation script for UAHEP project to test the login module.
- python 2.7.18 installed
- allure 2.13.9 :to generate detailed html reports
- Chrome or Mozilla installed
- Selenium: to automate browser
- pytest: to manage testcases
- openpyxl: to read/write excelfiles
- pytest-html: to generate simple html report
- pytest-xdist: to execute testcases parallely
- pytest-allure: to integrate allure json files
additonally
For setting up the virtual enviroment please follow the link https://linuxize.com/post/how-to-create-python-virtual-environments-on-ubuntu-18-04/
pip install -r req.txtthis will install all the required python libraries
sudo apt-get update -y && sudo apt-get install -y allure
this will install allure report (I use ubuntu)
Make sure the you are in project directory.then run
add python -m or python3 -m command before following command if the following command dont work
pytest -s -v ./testcases/login_pypytest -s -v ./testcases/login_py --html=./Reports/demo.htmlPreferred directory location should be passed where reports are to be generated as argument for --html
pytest -s -v ./testcases/login_py --html=./Reports/demo.html --alluredir=./Reports/allurePreferred directory location should be passed where allure reports are to be generated as argument for --alluredir
pytest -s -v -n=2 ./testcases/login_py --html=./Reports/demo.html --alluredir=./Reports/allurePreferred number of instances of browser should be provided as argument to -n
sudo allure serve {path to folder provided to --alluredir argument previously}