How appiummal/pytest_framework_practice works
Purpose and Entry Points
This is a Python UI test automation repository for checkbox interactions. The executable test entry point is tests/test_checkbox.py; pytest-wide setup is likely supplied by conftest.py. Tests operate through page objects rather than directly driving browser APIs.
Test Execution Layer
tests/test_checkbox.py defines the user-facing test scenarios and assertions. conftest.py is the suite integration boundary for fixtures, browser lifecycle setup, and shared test context. This layer should remain focused on scenario intent, delegating UI mechanics to pages and actions.
Configuration and Runtime Initialization
Configuration originates in config/config.py and is loaded through utils/config_loader.py. These modules establish environment-specific test settings such as target application details, browser selection, or execution behavior. Configuration is consumed before driver and page construction.
Browser Driver Boundary
core/driver_factory.py owns WebDriver creation and likely teardown-compatible driver selection. It is the principal boundary between the test framework and the browser automation runtime (typically Selenium/WebDriver). Browser-specific changes should be isolated here rather than spread across tests or page objects.
Interaction and Synchronization Core
core/actions.py centralizes reusable browser interactions, while core/wait_helpers.py encapsulates explicit waiting and readiness behavior. Together they protect page objects from low-level WebDriver calls and timing concerns. core/exceptions.py provides the domain-specific failure boundary for automation errors.
Page Object Model
pages/base_page.py provides shared page capabilities and connects page objects to the driver/actions layer. pages/checkbox_page.py models the checkbox screen’s locators and business-level operations. The intended flow is test → page method → action/wait helper → WebDriver, keeping selectors and UI behavior out of test cases.
Reporting and Observability
utils/logger.py supplies execution logging across framework layers. utils/report_manager.py manages test-report artifacts or report integration. These are cross-cutting services: tests and framework components can emit diagnostics, while reporting aggregates execution outcomes without owning browser control flow.
Main entry points: actions.py Browser actions · test_checkbox.py Checkbox scenarios · conftest.py Pytest setup · driver_factory.py Driver factory
Components 13
Test Suite
- Checkbox scenarios · User-facing checkbox assertions.
tests/test_checkbox.py - Pytest setup · Shared browser lifecycle and test context.
conftest.py
Automation Core
- Driver factory · Creates and selects browser drivers.
core/driver_factory.py - Browser actions · Reusable low-level browser operations.
core/actions.py - Wait helpers · Explicit readiness and timing behavior.
core/wait_helpers.py - Automation exceptions
core/exceptions.py
Page Objects
- Base page · Connects pages to driver actions.
pages/base_page.py - Checkbox page · Checkbox locators and business-level operations.
pages/checkbox_page.py
Configuration & Observability
- Test configuration
config/config.py - Config loader
utils/config_loader.py - Logger
utils/logger.py - Report manager · Aggregates test-report artifacts and outcomes.
utils/report_manager.py
Other components
- Browser runtime
Connections 15
- Checkbox scenarios → Pytest setup: runs with fixtures
- Checkbox scenarios → Checkbox page: uses
- Pytest setup → Config loader: loads settings
- Config loader → Test configuration: reads
- Pytest setup → Driver factory: initializes driver
- Driver factory → Browser runtime: creates
- Checkbox page → Base page: extends
- Base page → Browser actions: delegates interactions
- Browser actions → Wait helpers: synchronizes with
- Browser actions → Browser runtime: drives
- Wait helpers → Browser runtime: waits on
- Browser actions → Automation exceptions: raises
- Checkbox scenarios → Report manager: reports outcomes
- Browser actions → Logger: logs diagnostics
- Report manager → Logger: logs report events