Python Pytest Framework
To have a dry run of the framework follow below steps.
- Clone the repo
git clone https://github.com/MohammedWaasim/python_framework.git
- Have following plugin and softwares installed
pip3 install selenium
pip3 install pytest
pip3 install ddt
pip3 install allure-pytest
pip3 install pyyaml
pip3 install requests
pip3 install webdriver_manager
- Set up the env by running this command
export PYTHONPATH=$PYTHONPATH:.
- Run this line in the project folder
pytest tests/test_suite_demo.py --browser chrome --alluredir=reports --env staging
- To run api test alone exe this command 'pytest -k api --alluredir=reports'
- To run Web test alone exe 'pytest -k web --browser chrome --alluredir=reports'
- Finally to view the report run 'allure serve reports' <- this command will open the report in the dynamic page and will remain there till we press ctrl+c on the terminal.
NOTE: To run ndtv test run below test.
pytest tests/test_suite_demo.py --browser headless --alluredir=reports -v -s