All settings are setup in this project for a beginer to learn pytest.
Before running the app assuming that python 3.7.9 , mysql and virutalenv is installed on machine
- Create virtual environment with python3
$ virtualenv -p python3 envname
- Activate the virtual environment
$ source envname/bin/activate
- Install requisite packages:
$ sh scripts/install_requirements.sh
- Temporary running solution:
- Run all tests under a project
$ pytest tests/{project_name}/ -vv --settings=settings.{deployment_details}
Where: {project_name} = project_one, project_two, project_three & {deployment_details} = local, dev, qa, uat, rc, prd
- Run single tests under a project
$ pytest tests/{project_name}/test_file_name.py -vv -k 'test_name' --settings=settings.{deployment_details}