Publish Facebook Status
PreRequisites
- Python3 (Python/MAC / Python/Windows)
- FB_USERNAME variable key is set in your system env vars
- FB_PASSWORD variable key is set in your system env vars
- Python Virtual Environment (Python Virtual Environment)
- ChromeDriver installed in your Python Virtual Environment (ChromeDriver)
Setup
- Clone the repo automation_exercise
git clone https://github.com/eliran-shani/automation_exercise.git
- Create & Activate Virtual Environment
python3 -m venv .venv
source ./venv/bin/activate
- Install requirements.txt
pip3 install -r requirements.txt
- Inject ChromeDriver binary into
/.venv/bin
folder
Usage
-
Run all tests (default chrome browser):
pytest
-
Run all tests using a specific browser (only chrome supported at the moment:
pytest --browser chrome
-
Run all tests against a specific url (default Facebook URL):
pytest --url localhost:9090
-
Run tests by marker:
pytest -m acceptance
pytest -m regression
-
Run a specific test:
pytest tests/test_acceptance_publish_status.py
*Optional: Facebook test user:
username: test_mkwaaug_user@tfbnw.net
/ pass: 1qaz@WSX
Folder structure convention
.
├── attachments # All attachments used throghout the test
├── common # All reuseable functions
├── downloads # All relevant downloadables while the test is running
├── tests # All related tests
├── .gitignore # Github ignore file
├── conftest # Pytest configuration file
├── pytest.ini # One place to register all custom markers
├── requirements.txt # Python packages required to run this project
└── README.md