This is a Behavior-Driven Development (BDD) project using Behave and Selenium for web automation testing.
- Login functionality testing for CURA Healthcare Service
- Automated browser setup and teardown
- CI/CD integration with GitHub Actions
- Comprehensive logging with log file generation
- Test artifacts upload in CI pipeline (GitHub Actions)
features/: Contains BDD feature files and step definitionslogin.feature: Login scenariossteps/login_steps.py: Step implementationsenvironment.py: Browser setup and teardown
requirements.txt: Python dependencies.github/workflows/main.yml: CI pipelinetest_execution.log: Generated log file containing detailed execution logs (created after test runs)
-
Install dependencies:
pip install -r requirements.txt
-
Run tests:
behave
-
Run in headless mode (for CI):
HEADLESS=true behave
- Linted with flake8
- Follows PEP 8 style guidelines
- Includes docstrings for functions
- Comprehensive logging for debugging and monitoring
The project includes detailed logging throughout the test execution:
- Step-level logging: Each step in the login scenarios logs its actions and results
- Browser lifecycle logging: Logs browser initialization, navigation, and cleanup
- Scenario logging: Logs the start and end of each test scenario
Logs are automatically saved to test_execution.log after each scenario run.
To view logs during test execution, run:
behave -vTo view the log file after execution:
cat test_execution.log