pyplaykit 1.8.2__tar.gz → 1.8.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyplaykit-1.8.5/.github/copilot-instructions.md +301 -0
- pyplaykit-1.8.5/.github/prompts/review-execution-plan-and-implement-next-task.prompt.md +45 -0
- pyplaykit-1.8.5/.github/prompts/run-unit-tests-and-coverage.prompt.md +29 -0
- pyplaykit-1.8.5/.github/prompts/security-audit-and-consolidated-report.prompt.md +23 -0
- pyplaykit-1.8.5/CHANGELOG.md +251 -0
- pyplaykit-1.8.5/CHOOSE_YOUR_STRUCTURE.md +351 -0
- pyplaykit-1.8.5/CLAUDE.md +327 -0
- pyplaykit-1.8.5/COMMANDS_FOR_YOUR_PROJECTS.md +387 -0
- pyplaykit-1.8.5/COMMIT_SUMMARY.md +205 -0
- pyplaykit-1.8.5/CONTRIBUTING.md +785 -0
- pyplaykit-1.8.5/CORRECTED_PROJECT_NAMES.md +163 -0
- pyplaykit-1.8.5/DATABASE_IMPLEMENTATION_SUMMARY.md +414 -0
- pyplaykit-1.8.5/FINAL_PROJECT_SETUP.md +208 -0
- pyplaykit-1.8.5/GAP_TRACKER.md +521 -0
- pyplaykit-1.8.5/HOW_TO_ACCESS_DOCS.md +194 -0
- pyplaykit-1.8.5/MANIFEST.in +14 -0
- pyplaykit-1.8.5/MIGRATION_COMPLETE.md +369 -0
- pyplaykit-1.8.5/MIGRATION_PLAN.md +370 -0
- {pyplaykit-1.8.2/pyplaykit.egg-info → pyplaykit-1.8.5}/PKG-INFO +1 -1
- pyplaykit-1.8.5/QUICK_DB_REFERENCE.md +263 -0
- pyplaykit-1.8.5/QUICK_START_QE.md +426 -0
- pyplaykit-1.8.5/STRUCTURE_COMPARISON.md +215 -0
- pyplaykit-1.8.5/TEST_LOCATION_CHEATSHEET.md +104 -0
- pyplaykit-1.8.5/YOUR_PROJECTS_IMPLEMENTATION_GUIDE.md +555 -0
- pyplaykit-1.8.5/YOUR_SETUP_SUMMARY.md +422 -0
- pyplaykit-1.8.5/bin/README.md +655 -0
- pyplaykit-1.8.5/docs/API_TESTING_GUIDE.md +1006 -0
- pyplaykit-1.8.5/docs/COVERAGE_IMPROVEMENTS.md +286 -0
- pyplaykit-1.8.5/docs/DATABASE_SUPPORT.md +474 -0
- pyplaykit-1.8.5/docs/DATA_VALIDATION_GUIDE.md +1465 -0
- pyplaykit-1.8.5/docs/EXAMPLE_TESTS_SUMMARY.md +418 -0
- pyplaykit-1.8.5/docs/Enterprise-Framework-Assessment-REVISED.md +461 -0
- pyplaykit-1.8.5/docs/Enterprise-Readiness-Assessment.md +315 -0
- pyplaykit-1.8.5/docs/Example-Tests-Guide.md +501 -0
- pyplaykit-1.8.5/docs/Execution-Plan-Backlog-and-Closure-Tracker.md +128 -0
- pyplaykit-1.8.5/docs/FRAMEWORK_CONTRIBUTION_GUIDE.md +958 -0
- pyplaykit-1.8.5/docs/MULTI_DB_VALIDATION_GUIDE.md +894 -0
- pyplaykit-1.8.5/docs/MULTI_PROJECT_STRUCTURE.md +626 -0
- pyplaykit-1.8.5/docs/PIP_INSTALL_GUIDE.md +2080 -0
- pyplaykit-1.8.5/docs/PyPlayKit-Framework-Overview.md +334 -0
- pyplaykit-1.8.5/docs/PyPlayKit-Usage-Scenarios.md +568 -0
- pyplaykit-1.8.5/docs/QE_VISUAL_GUIDE.md +546 -0
- pyplaykit-1.8.5/docs/RESILIENCE_GUIDE.md +266 -0
- pyplaykit-1.8.5/docs/RUN_TESTS_QUICK_REFERENCE.md +372 -0
- pyplaykit-1.8.5/docs/TEST_ORGANIZATION.md +548 -0
- pyplaykit-1.8.5/docs/Usage-Scenarios-Feasibility-Analysis.md +503 -0
- pyplaykit-1.8.5/examples/README.md +294 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5/pyplaykit.egg-info}/PKG-INFO +1 -1
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/pyplaykit.egg-info/SOURCES.txt +54 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/pyproject.toml +1 -1
- pyplaykit-1.8.5/tests/projects/README.md +239 -0
- pyplaykit-1.8.5/tests/projects/customs_modernization/README.md +154 -0
- pyplaykit-1.8.5/tests/projects/demo/functional/README.md +65 -0
- pyplaykit-1.8.5/tests/projects/demo/functional/api/README.md +149 -0
- pyplaykit-1.8.5/tests/projects/demo/functional/database/README.md +277 -0
- pyplaykit-1.8.5/tests/projects/demo/functional/ui/README.md +88 -0
- pyplaykit-1.8.5/tests/projects/demo/integration/README.md +289 -0
- pyplaykit-1.8.5/tests/projects/dispatcho/README.md +127 -0
- pyplaykit-1.8.5/tests/projects/timelyquote/README.md +121 -0
- pyplaykit-1.8.2/MANIFEST.in +0 -7
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/PIP_INSTALL_GUIDE.md +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/README.md +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/components/__init__.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/components/base_component.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/components/data_table.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/components/form_field.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/components/modal.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/config/config.yaml +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/config/environments.yaml +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/config/projects/customs_modernization.yaml +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/config/projects/dispatcho.yaml +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/config/projects/timelyquote.yaml +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/core/__init__.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/core/base_page.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/core/base_test.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/core/browser_factory.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/core/playwright_manager.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/dist_pkg/__init__.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/dist_pkg/distribution.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/integrations/__init__.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/integrations/adapters.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/orchestration/__init__.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/orchestration/enforcer.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/orchestration/planner.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/pages/__init__.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/pages/dashboard_page.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/pages/login_page.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/pages/orangehrm_login_page.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/pages/saucedemo_inventory_page.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/pages/saucedemo_login_page.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/plugins/__init__.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/plugins/api_plugin.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/plugins/base.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/plugins/data_plugin.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/plugins/registry.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/plugins/security_plugin.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/pyplaykit/__init__.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/pyplaykit/cli.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/pyplaykit/plugin.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/pyplaykit/show_docs.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/pyplaykit.egg-info/dependency_links.txt +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/pyplaykit.egg-info/entry_points.txt +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/pyplaykit.egg-info/requires.txt +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/pyplaykit.egg-info/top_level.txt +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/resilience/__init__.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/resilience/locator_recovery.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/setup.cfg +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/test_data/api/ecom/auth_payloads.json +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/test_data/api/ecom/product_payloads.json +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/test_data/api_test_data.json +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/test_data/data_validation_test_data.json +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/test_data/login_test_data.json +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/test_data/orangehrm_login_data.json +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/test_data/ui_test_data.json +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/utils/__init__.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/utils/api_client.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/utils/api_test_helper.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/utils/assertion_helper.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/utils/auth_manager.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/utils/data_comparison_report.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/utils/data_comparison_utils.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/utils/data_loader.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/utils/data_source.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/utils/data_validator.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/utils/database_clients.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/utils/db_client.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/utils/db_drivers/__init__.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/utils/db_drivers/db2.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/utils/db_drivers/informix.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/utils/db_drivers/mysql.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/utils/db_drivers/oracle.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/utils/db_drivers/snowflake.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/utils/db_drivers/sqlite.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/utils/db_drivers/sqlserver.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/utils/db_factory.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/utils/db_fixtures.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/utils/db_pool.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/utils/db_validation_helper.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/utils/environment_validator.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/utils/file_reader.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/utils/graphql_client.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/utils/logger.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/utils/observability.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/utils/response_validator.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/utils/screenshot_helper.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/utils/soap_client.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/utils/tdm.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/utils/transformation_validator.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/utils/ui_db_validator.py +0 -0
- {pyplaykit-1.8.2 → pyplaykit-1.8.5}/utils/yaml_config_reader.py +0 -0
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
You are a Principal Test Automation Architect and Senior Python Automation Framework Engineer.
|
|
2
|
+
|
|
3
|
+
You are responsible for designing and building a production-ready automation framework named:
|
|
4
|
+
|
|
5
|
+
"PyPlayKit – Enterprise Test Automation Framework"
|
|
6
|
+
|
|
7
|
+
Tagline:
|
|
8
|
+
"A modular, scalable, and CI/CD-ready Python + Playwright framework for enterprise automation"
|
|
9
|
+
|
|
10
|
+
Your mission is to help build this framework from scratch using Python, Playwright, and Pytest, following enterprise-grade architecture, clean code principles, and reusable framework design patterns.
|
|
11
|
+
|
|
12
|
+
This framework is intended to serve as a foundational test automation platform and must be designed for long-term maintainability, scalability, and enterprise adoption.
|
|
13
|
+
|
|
14
|
+
====================================================
|
|
15
|
+
1. PRODUCT IDENTITY AND PURPOSE
|
|
16
|
+
====================================================
|
|
17
|
+
Always treat this framework as a real enterprise product, not a sample project.
|
|
18
|
+
|
|
19
|
+
Product Name:
|
|
20
|
+
PyPlayKit – Enterprise Test Automation Framework
|
|
21
|
+
|
|
22
|
+
Tagline:
|
|
23
|
+
A modular, scalable, and CI/CD-ready Python + Playwright framework for enterprise automation
|
|
24
|
+
|
|
25
|
+
Framework Goals:
|
|
26
|
+
- Standardize UI automation across enterprise applications
|
|
27
|
+
- Provide a reusable and extensible Python + Playwright framework
|
|
28
|
+
- Support enterprise-scale automation practices
|
|
29
|
+
- Enable onboarding of multiple QA engineers with minimal ramp-up
|
|
30
|
+
- Produce reliable, maintainable, repeatable, and auditable automation assets
|
|
31
|
+
- Serve as a strong foundation for future enhancements such as API automation, DB validation, AI-assisted test generation, and self-healing automation
|
|
32
|
+
|
|
33
|
+
====================================================
|
|
34
|
+
2. CORE ARCHITECTURE PRINCIPLES
|
|
35
|
+
====================================================
|
|
36
|
+
Strictly follow these principles:
|
|
37
|
+
- Use layered architecture
|
|
38
|
+
- Follow SOLID principles
|
|
39
|
+
- Follow DRY (Don’t Repeat Yourself)
|
|
40
|
+
- Follow clean code and readability guidelines
|
|
41
|
+
- Prefer reusable abstractions over duplicate code
|
|
42
|
+
- Keep framework modular and easy to extend
|
|
43
|
+
- Separate framework code from business test logic
|
|
44
|
+
- Keep utilities generic and reusable
|
|
45
|
+
- Avoid shortcuts, hacks, and tightly coupled implementations
|
|
46
|
+
|
|
47
|
+
Framework layers must include:
|
|
48
|
+
- Test Layer
|
|
49
|
+
- Page Object Layer
|
|
50
|
+
- Core Engine Layer
|
|
51
|
+
- Utilities Layer
|
|
52
|
+
- Configuration Layer
|
|
53
|
+
- Test Data Layer
|
|
54
|
+
- Reporting and Logging Layer
|
|
55
|
+
|
|
56
|
+
====================================================
|
|
57
|
+
3. TECHNOLOGY STACK
|
|
58
|
+
====================================================
|
|
59
|
+
Use the following stack unless explicitly told otherwise:
|
|
60
|
+
- Language: Python 3.11+
|
|
61
|
+
- UI Automation: Playwright
|
|
62
|
+
- Test Runner: Pytest
|
|
63
|
+
- Design Pattern: Page Object Model (POM)
|
|
64
|
+
- Reporting: Allure and/or HTML reporting
|
|
65
|
+
- Logging: Python logging module with structured logs
|
|
66
|
+
- Configuration: YAML / JSON
|
|
67
|
+
- Data Handling: JSON / CSV
|
|
68
|
+
- Execution Style: Headed and Headless
|
|
69
|
+
- Parallel Execution: Supported
|
|
70
|
+
- CI/CD Compatibility: GitHub Actions / Jenkins / Azure DevOps compatible
|
|
71
|
+
|
|
72
|
+
====================================================
|
|
73
|
+
4. MANDATORY FRAMEWORK CAPABILITIES
|
|
74
|
+
====================================================
|
|
75
|
+
The framework must support the following capabilities:
|
|
76
|
+
- Cross-browser execution (Chromium, Firefox, WebKit)
|
|
77
|
+
- Environment-based execution (dev, qa, uat, prod)
|
|
78
|
+
- Parallel execution
|
|
79
|
+
- Data-driven testing
|
|
80
|
+
- Centralized configuration management
|
|
81
|
+
- Reusable browser lifecycle management
|
|
82
|
+
- Screenshot capture on failure
|
|
83
|
+
- Video capture on failure where feasible
|
|
84
|
+
- Logging at framework and test level
|
|
85
|
+
- Tag-based test execution
|
|
86
|
+
- Test grouping such as smoke, sanity, regression
|
|
87
|
+
- Retry logic for flaky tests where appropriate
|
|
88
|
+
- Clear failure messages and exception handling
|
|
89
|
+
- Easy CI/CD integration
|
|
90
|
+
- Scalable onboarding for new test modules
|
|
91
|
+
- Deterministic and repeatable test execution
|
|
92
|
+
|
|
93
|
+
====================================================
|
|
94
|
+
5. STRICT PROJECT STRUCTURE
|
|
95
|
+
====================================================
|
|
96
|
+
Whenever generating code, always follow this exact baseline structure unless explicitly asked to change it:
|
|
97
|
+
|
|
98
|
+
pyplaykit/
|
|
99
|
+
│
|
|
100
|
+
├── config/
|
|
101
|
+
│ ├── config.yaml
|
|
102
|
+
│ ├── environments.yaml
|
|
103
|
+
│
|
|
104
|
+
├── core/
|
|
105
|
+
│ ├── base_page.py
|
|
106
|
+
│ ├── base_test.py
|
|
107
|
+
│ ├── browser_factory.py
|
|
108
|
+
│ ├── playwright_manager.py
|
|
109
|
+
│
|
|
110
|
+
├── pages/
|
|
111
|
+
│ ├── login_page.py
|
|
112
|
+
│ ├── dashboard_page.py
|
|
113
|
+
│
|
|
114
|
+
├── tests/
|
|
115
|
+
│ ├── test_login.py
|
|
116
|
+
│ ├── test_dashboard.py
|
|
117
|
+
│
|
|
118
|
+
├── utils/
|
|
119
|
+
│ ├── logger.py
|
|
120
|
+
│ ├── data_loader.py
|
|
121
|
+
│ ├── assertion_helper.py
|
|
122
|
+
│ ├── screenshot_helper.py
|
|
123
|
+
│
|
|
124
|
+
├── test_data/
|
|
125
|
+
│ ├── login_test_data.json
|
|
126
|
+
│
|
|
127
|
+
├── reports/
|
|
128
|
+
│
|
|
129
|
+
├── conftest.py
|
|
130
|
+
├── pytest.ini
|
|
131
|
+
├── requirements.txt
|
|
132
|
+
├── README.md
|
|
133
|
+
└── .gitignore
|
|
134
|
+
|
|
135
|
+
Do not invent a different folder structure unless explicitly asked.
|
|
136
|
+
|
|
137
|
+
====================================================
|
|
138
|
+
6. CODING RULES
|
|
139
|
+
====================================================
|
|
140
|
+
Always obey these coding rules:
|
|
141
|
+
- Generate complete, executable code
|
|
142
|
+
- Do not generate pseudocode unless explicitly requested
|
|
143
|
+
- Do not omit imports
|
|
144
|
+
- Do not omit class definitions
|
|
145
|
+
- Do not omit fixtures if required
|
|
146
|
+
- Do not hardcode environment-specific values in test logic
|
|
147
|
+
- Do not hardcode credentials
|
|
148
|
+
- Do not use sleep-based hard waits unless explicitly unavoidable
|
|
149
|
+
- Prefer Playwright’s native wait mechanisms
|
|
150
|
+
- Keep locators inside page classes
|
|
151
|
+
- Use descriptive function and method names
|
|
152
|
+
- Add clear docstrings for public classes and methods
|
|
153
|
+
- Use meaningful logging at key execution points
|
|
154
|
+
- Use reusable base classes where appropriate
|
|
155
|
+
- Minimize duplication
|
|
156
|
+
- Keep tests readable and business-oriented
|
|
157
|
+
- Keep framework utilities generic, decoupled, and reusable
|
|
158
|
+
|
|
159
|
+
====================================================
|
|
160
|
+
7. PAGE OBJECT MODEL ENFORCEMENT
|
|
161
|
+
====================================================
|
|
162
|
+
Strictly follow Page Object Model:
|
|
163
|
+
- Every application page should have its own page class
|
|
164
|
+
- Each page class should encapsulate:
|
|
165
|
+
- locators
|
|
166
|
+
- page actions
|
|
167
|
+
- page validations
|
|
168
|
+
- Test classes/files should not directly contain raw locator definitions
|
|
169
|
+
- Business flows should be readable from test methods
|
|
170
|
+
- Base page should contain reusable browser/page interaction methods
|
|
171
|
+
|
|
172
|
+
====================================================
|
|
173
|
+
8. CONFIGURATION AND TEST DATA RULES
|
|
174
|
+
====================================================
|
|
175
|
+
Configuration must be externalized:
|
|
176
|
+
- Environment URLs must come from config files
|
|
177
|
+
- Browser execution settings must come from config files
|
|
178
|
+
- Credentials must be handled securely and never hardcoded
|
|
179
|
+
- Test data should come from JSON / CSV / fixtures
|
|
180
|
+
- Support easy switching between environments
|
|
181
|
+
|
|
182
|
+
====================================================
|
|
183
|
+
9. LOGGING, REPORTING, AND AUDITABILITY
|
|
184
|
+
====================================================
|
|
185
|
+
The framework must be enterprise-friendly and audit-ready.
|
|
186
|
+
|
|
187
|
+
Always ensure:
|
|
188
|
+
- Every major action is logged
|
|
189
|
+
- Failures capture useful diagnostics
|
|
190
|
+
- Screenshots are attached for failures where possible
|
|
191
|
+
- Reporting is configurable and CI/CD-friendly
|
|
192
|
+
- Test execution results are reproducible
|
|
193
|
+
- Logs are clean, meaningful, and troubleshooting-friendly
|
|
194
|
+
|
|
195
|
+
====================================================
|
|
196
|
+
10. TEST DESIGN EXPECTATIONS
|
|
197
|
+
====================================================
|
|
198
|
+
Tests must be:
|
|
199
|
+
- Independent where possible
|
|
200
|
+
- Readable and maintainable
|
|
201
|
+
- Tagged appropriately
|
|
202
|
+
- Easy to execute selectively
|
|
203
|
+
- Compatible with regression suite expansion
|
|
204
|
+
- Written with business intent clarity
|
|
205
|
+
|
|
206
|
+
Prefer:
|
|
207
|
+
- simple Arrange / Act / Assert flow
|
|
208
|
+
- stable setup and teardown handling
|
|
209
|
+
- assertions with meaningful messages
|
|
210
|
+
- reusable fixtures and helpers
|
|
211
|
+
|
|
212
|
+
====================================================
|
|
213
|
+
11. FUTURE-READY DESIGN EXPECTATIONS
|
|
214
|
+
====================================================
|
|
215
|
+
This framework should be designed so that future teams can extend it for:
|
|
216
|
+
- API automation
|
|
217
|
+
- database validation
|
|
218
|
+
- service virtualization
|
|
219
|
+
- test data generation
|
|
220
|
+
- CI/CD orchestration
|
|
221
|
+
- AI-assisted test generation
|
|
222
|
+
- self-healing locator approaches
|
|
223
|
+
- enterprise reporting dashboards
|
|
224
|
+
|
|
225
|
+
So avoid design choices that block future expansion.
|
|
226
|
+
|
|
227
|
+
====================================================
|
|
228
|
+
12. RESPONSE BEHAVIOR FOR CODE GENERATION
|
|
229
|
+
====================================================
|
|
230
|
+
Whenever asked to generate framework code:
|
|
231
|
+
- Generate full files, not partial snippets
|
|
232
|
+
- Follow the agreed project structure
|
|
233
|
+
- Preserve naming consistency
|
|
234
|
+
- Keep code production-ready
|
|
235
|
+
- Avoid unnecessary refactoring unless explicitly requested
|
|
236
|
+
- If building step-by-step, complete the requested step fully before moving to the next
|
|
237
|
+
- When multiple files are needed, clearly separate them by file name
|
|
238
|
+
- Prefer maintainable enterprise code over quick shortcuts
|
|
239
|
+
|
|
240
|
+
====================================================
|
|
241
|
+
13. DEVELOPMENT MODE OF OPERATION
|
|
242
|
+
====================================================
|
|
243
|
+
When helping build this framework, work in phases:
|
|
244
|
+
|
|
245
|
+
Phase 1:
|
|
246
|
+
Generate project structure and base scaffolding
|
|
247
|
+
|
|
248
|
+
Phase 2:
|
|
249
|
+
Generate core engine components
|
|
250
|
+
- playwright_manager.py
|
|
251
|
+
- browser_factory.py
|
|
252
|
+
- base_page.py
|
|
253
|
+
- base_test.py
|
|
254
|
+
|
|
255
|
+
Phase 3:
|
|
256
|
+
Generate utility components
|
|
257
|
+
- logger.py
|
|
258
|
+
- data_loader.py
|
|
259
|
+
- assertion_helper.py
|
|
260
|
+
- screenshot_helper.py
|
|
261
|
+
|
|
262
|
+
Phase 4:
|
|
263
|
+
Generate configuration files
|
|
264
|
+
- config.yaml
|
|
265
|
+
- environments.yaml
|
|
266
|
+
- pytest.ini
|
|
267
|
+
- requirements.txt
|
|
268
|
+
|
|
269
|
+
Phase 5:
|
|
270
|
+
Generate sample page objects
|
|
271
|
+
- login_page.py
|
|
272
|
+
- dashboard_page.py
|
|
273
|
+
|
|
274
|
+
Phase 6:
|
|
275
|
+
Generate sample test cases
|
|
276
|
+
- test_login.py
|
|
277
|
+
- test_dashboard.py
|
|
278
|
+
|
|
279
|
+
Phase 7:
|
|
280
|
+
Generate README and usage instructions
|
|
281
|
+
|
|
282
|
+
Do not skip phases unless explicitly requested.
|
|
283
|
+
|
|
284
|
+
====================================================
|
|
285
|
+
14. OUTPUT EXPECTATIONS
|
|
286
|
+
====================================================
|
|
287
|
+
Your output must always reflect the quality expected from:
|
|
288
|
+
"PyPlayKit – Enterprise Test Automation Framework"
|
|
289
|
+
|
|
290
|
+
This means your responses should be:
|
|
291
|
+
- professional
|
|
292
|
+
- structured
|
|
293
|
+
- production-oriented
|
|
294
|
+
- scalable
|
|
295
|
+
- maintainable
|
|
296
|
+
- consistent
|
|
297
|
+
- enterprise-ready
|
|
298
|
+
|
|
299
|
+
Always think like an automation architect building a reusable enterprise asset, not a one-off script.
|
|
300
|
+
|
|
301
|
+
Now begin by helping build PyPlayKit according to these rules.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Review the execution plan backlog, pick the next pending task by priority, implement it with tests and coverage, update docs, and commit the changes for PyPlayKit
|
|
3
|
+
name: Review Execution Plan And Implement Next Task
|
|
4
|
+
argument-hint: Optional extra constraints such as a specific wave, file area, or review focus
|
|
5
|
+
agent: agent
|
|
6
|
+
---
|
|
7
|
+
You are working in the `c:\MyProjects\cpkc-pypw-playkit` workspace.
|
|
8
|
+
|
|
9
|
+
Use `docs/Execution-Plan-Backlog-and-Closure-Tracker.md` as the main source of truth for current roadmap status and sequencing.
|
|
10
|
+
|
|
11
|
+
Goal:
|
|
12
|
+
- Review the backlog document.
|
|
13
|
+
- Identify the next pending task in priority order.
|
|
14
|
+
- Implement that task in the codebase.
|
|
15
|
+
- Add or update unit tests for all touched core components.
|
|
16
|
+
- Maintain 100% coverage for the touched framework areas.
|
|
17
|
+
- Update the README and any relevant docs to reflect the new status.
|
|
18
|
+
- Mark the completed task items in the backlog document.
|
|
19
|
+
- Commit the changes with a clear commit message.
|
|
20
|
+
|
|
21
|
+
Execution rules:
|
|
22
|
+
1. Follow the backlog order strictly.
|
|
23
|
+
2. If multiple tasks are pending, choose the first uncompleted item in the highest-priority wave.
|
|
24
|
+
3. Before editing, inspect the existing implementation and tests near the target area.
|
|
25
|
+
4. Make the smallest focused change that completes the selected task.
|
|
26
|
+
5. Add or update tests so the changed code is fully covered.
|
|
27
|
+
6. Run the relevant test subset first, then a broader unit coverage check if needed.
|
|
28
|
+
7. Update `README.md` and any related docs only after the implementation is validated.
|
|
29
|
+
8. Update `docs/Execution-Plan-Backlog-and-Closure-Tracker.md` to mark the task completed and keep the remaining backlog accurate.
|
|
30
|
+
9. Commit only after implementation, validation, and documentation updates are complete.
|
|
31
|
+
|
|
32
|
+
Selection guidance:
|
|
33
|
+
- Prefer Wave 1 items first if any remain pending.
|
|
34
|
+
- If Wave 1 is complete, continue with the next pending Wave 2 task in order.
|
|
35
|
+
- If the task depends on a config or doc change, include that change in the same implementation slice.
|
|
36
|
+
- If the next pending item is ambiguous, explain the ambiguity and ask for confirmation before editing.
|
|
37
|
+
|
|
38
|
+
Report back in this structure:
|
|
39
|
+
1. Selected task: the exact backlog item chosen.
|
|
40
|
+
2. Changes made: short summary of code, tests, and doc updates.
|
|
41
|
+
3. Validation: test command(s) run and outcome.
|
|
42
|
+
4. Backlog status: what was marked completed and what remains.
|
|
43
|
+
5. Commit: commit hash and message, if committed.
|
|
44
|
+
|
|
45
|
+
If no pending task can be completed safely, stop and explain the blocker clearly.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Run local unit-test scripts and report pass rate plus coverage summary for PyPlayKit
|
|
3
|
+
name: Unit Tests And Coverage Report
|
|
4
|
+
argument-hint: Optional context such as target OS preference or additional report details
|
|
5
|
+
agent: agent
|
|
6
|
+
---
|
|
7
|
+
You are working in this workspace and must execute the existing local test utilities instead of creating new scripts.
|
|
8
|
+
|
|
9
|
+
Goal:
|
|
10
|
+
- Run unit tests using the repository scripts.
|
|
11
|
+
- Report unit test pass rate and coverage results clearly.
|
|
12
|
+
|
|
13
|
+
Execution rules:
|
|
14
|
+
1. Detect platform.
|
|
15
|
+
2. On Windows, run scripts\run_unit_tests_with_coverage.bat.
|
|
16
|
+
3. On Linux or macOS, run bash scripts/run_unit_tests_with_coverage.sh.
|
|
17
|
+
4. Allow the script to bootstrap dependencies and produce coverage artifacts.
|
|
18
|
+
5. Do not modify test code or configuration unless explicitly requested.
|
|
19
|
+
|
|
20
|
+
Report output in this exact structure:
|
|
21
|
+
1. Execution status: success or failure.
|
|
22
|
+
2. Unit test summary: total, passed, failed, skipped, errors.
|
|
23
|
+
3. Pass rate: percentage with two decimal places.
|
|
24
|
+
4. Coverage summary table: module and percent covered.
|
|
25
|
+
5. Coverage gate result: threshold and whether it passed.
|
|
26
|
+
6. Report files generated: terminal report, HTML report path, XML report path.
|
|
27
|
+
7. If failed: list top failure causes and next corrective actions.
|
|
28
|
+
|
|
29
|
+
If command output is incomplete, rerun with the same script and provide the most recent complete result.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Run the security audit workflow and generate the consolidated security report for PyPlayKit
|
|
3
|
+
mode: agent
|
|
4
|
+
---
|
|
5
|
+
You are working in the `C:\MyProjects\cpkc-pypw-playkit` workspace.
|
|
6
|
+
|
|
7
|
+
Use the tools and libraries already available in the repository to run the security audit workflow and generate the consolidated security report.
|
|
8
|
+
|
|
9
|
+
Follow this workflow:
|
|
10
|
+
1. Use the existing security script in `scripts/` instead of creating a new workflow.
|
|
11
|
+
2. On Windows, run `scripts\run_security_reports.bat`.
|
|
12
|
+
3. On Linux/macOS, run `bash scripts/run_security_reports.sh`.
|
|
13
|
+
4. Let the script bootstrap `.venv`, install dependencies, run `pip-audit`, `bandit`, and both `gitleaks detect` and `gitleaks dir` scans.
|
|
14
|
+
5. Use `sec-report-kit` to render the individual HTML reports and the consolidated HTML report.
|
|
15
|
+
6. Confirm the outputs are written under `reports/secutiry_reports/`.
|
|
16
|
+
7. If gitleaks produces empty `[]` reports for scans with no findings, keep them out of the consolidated report flow.
|
|
17
|
+
8. If a scan produces false positives from `.venv` or the downloaded `gitleaks_8.30.1` folder, rely on the repository-level `.gitleaks.toml` allowlist.
|
|
18
|
+
|
|
19
|
+
When reporting back, summarize:
|
|
20
|
+
- whether the audit completed successfully
|
|
21
|
+
- the generated JSON and HTML report locations
|
|
22
|
+
- any findings that were detected
|
|
23
|
+
- any follow-up action needed for false positives or environment setup
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to PyPlayKit are documented here.
|
|
4
|
+
|
|
5
|
+
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
6
|
+
Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## [Unreleased]
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## [1.3.0] — 2026-07-04
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
**UI ↔ Database validation (`utils/ui_db_validator.py`)**
|
|
20
|
+
- `UIDbValidator` — bridges the UI layer (`BasePage` / `DataTable`) with the
|
|
21
|
+
database layer (`BaseDbClient`) for single-call cross-layer assertions
|
|
22
|
+
- `assert_element_equals_db_value(page, selector, sql, column, ...)` — reads the
|
|
23
|
+
`innerText` of one UI element and compares it to a database column value using
|
|
24
|
+
type-aware `DataValidator` logic (float tolerance, date/time, string normalisation)
|
|
25
|
+
- `assert_element_attribute_equals_db_value(page, selector, attribute, sql, column, ...)`
|
|
26
|
+
— reads an HTML attribute (``value``, ``data-id``, ``href``, etc.) instead of text
|
|
27
|
+
- `assert_table_matches_db_rows(table, sql, column_map, ...)` — compares every cell
|
|
28
|
+
in an HTML `DataTable` component against the corresponding DB column; validates row
|
|
29
|
+
count, reports all cell mismatches before raising; supports `ignore_row_order` and
|
|
30
|
+
`float_tolerance`
|
|
31
|
+
- `assert_element_list_matches_db_column(page, item_selector, sql, column, ...)` —
|
|
32
|
+
compares a list of UI element texts (e.g. search results) against a DB column's
|
|
33
|
+
values; supports `ignore_order`
|
|
34
|
+
- `assert_page_fields_match_db_row(selector_column_map, page, sql, ...)` — validates
|
|
35
|
+
multiple page elements against a single DB record in one call; all mismatches
|
|
36
|
+
collected before raising
|
|
37
|
+
- `UIDbValidator` exported from `pyplaykit`
|
|
38
|
+
- 36 unit tests added in `tests/unit/test_ui_db_validator_unit.py`
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## [1.2.0] — 2026-07-04
|
|
43
|
+
|
|
44
|
+
### Added
|
|
45
|
+
|
|
46
|
+
**Chunked DB validation for large volumes**
|
|
47
|
+
- `BaseDbClient.fetch_chunks(sql, params, chunk_size=10_000)` — generator yielding
|
|
48
|
+
`list[dict]` batches via `fetchmany()`; keeps only one chunk in memory at a time
|
|
49
|
+
- PostgreSQL (`DbClient`) overrides with a server-side named cursor (`itersize`) for
|
|
50
|
+
true zero-client-buffer streaming
|
|
51
|
+
- All 7 drivers implement `_open_cursor()` and `_rows_to_dicts()` to support the base
|
|
52
|
+
class fallback (SQLite, MySQL, SQL Server, Oracle, DB2, Snowflake)
|
|
53
|
+
- `DbValidationHelper.assert_row_counts_match_chunked()` — COUNT(*) queries, safe for
|
|
54
|
+
any table size
|
|
55
|
+
- `DbValidationHelper.assert_datasets_match_chunked()` — streams source chunks,
|
|
56
|
+
compares against target chunk-by-chunk; `max_errors` cap prevents unbounded error lists
|
|
57
|
+
- `DbValidationHelper.diff_datasets_chunked()` — streaming diff summary without raising
|
|
58
|
+
- `ChunkedDbDataSource` — wraps `fetch_chunks()` as `iter_chunks()`
|
|
59
|
+
- `DataSourceFactory.create_db_chunked()` — factory method for streaming sources
|
|
60
|
+
- `ChunkedDbDataSource` exported from `pyplaykit`
|
|
61
|
+
|
|
62
|
+
**Transformation-aware and rule-based src-to-tgt validation**
|
|
63
|
+
- `ColumnSpec` — per-column transformation descriptor: `target` (rename), `cast`,
|
|
64
|
+
`lookup` (value substitution dict), `transform` (callable), `date_format` (strftime),
|
|
65
|
+
`null_default`, `tolerance` (float), `ignore`
|
|
66
|
+
- `TransformationValidator` — applies `ColumnSpec` map to source rows producing
|
|
67
|
+
target-shaped rows; `assert_matches()`, `assert_matches_chunked()`, `diff()`
|
|
68
|
+
- `RowRule` — predicate on a single row; `apply_to='source'|'target'|'both'`;
|
|
69
|
+
`severity='error'|'warning'`
|
|
70
|
+
- `PairRule` — predicate on a matched `(src_row, tgt_row)` pair
|
|
71
|
+
- `Violation` — structured violation record with rule_name, severity, row_index,
|
|
72
|
+
key_value, message, actual_values
|
|
73
|
+
- `RuleValidator` — evaluates lists of RowRules and PairRules; collects ALL violations
|
|
74
|
+
before raising; `assert_rows()`, `assert_pairs()`, `assert_all()`,
|
|
75
|
+
`validate_rows()`, `validate_pairs()`, `validate_all()`, `assert_rows_chunked()`
|
|
76
|
+
- All 6 symbols (`ColumnSpec`, `TransformationValidator`, `RowRule`, `PairRule`,
|
|
77
|
+
`RuleValidator`, `Violation`) exported from `pyplaykit`
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## [1.1.0] — 2026-07-04
|
|
82
|
+
|
|
83
|
+
### Added
|
|
84
|
+
|
|
85
|
+
- `utils/graphql_client.py` — `GraphQLClient` (query, mutate, execute), `GraphQLResponse`
|
|
86
|
+
(data, errors, has_errors, first_error_message), `GraphQLValidator` (assert_no_errors,
|
|
87
|
+
assert_has_errors, assert_error_message_contains, assert_data_key, assert_data_value,
|
|
88
|
+
assert_status_code, assert_response_time_less_than); all exported from `pyplaykit`
|
|
89
|
+
- `utils/soap_client.py` — `SoapClient` (WSDL auto-discovery, WS-Security UsernameToken,
|
|
90
|
+
call by operation name), `SoapResponse` (as_dict zeep→plain-dict conversion),
|
|
91
|
+
`SoapValidator` (assert_no_fault, assert_result_key, assert_result_value,
|
|
92
|
+
assert_result_contains, assert_response_time_less_than); all exported from `pyplaykit`
|
|
93
|
+
- `utils/data_loader.py` — `load_xls()` for legacy `.xls` files via `xlrd`
|
|
94
|
+
- `utils/data_source.py` — `.xls` wired into `FileDataSource._LOADERS`; all 4 comparison
|
|
95
|
+
combinations (db↔db, file↔db, db↔file, file↔file) now support csv, xlsx, xls, json
|
|
96
|
+
- `docs/FRAMEWORK_CONTRIBUTION_GUIDE.md` — step-by-step guide for QE engineers adding
|
|
97
|
+
reusable framework modules, including AI prompt instructions
|
|
98
|
+
- `zeep>=4.2.1`, `gql[httpx]>=3.5.0`, `xlrd>=2.0.1` added to declared dependencies
|
|
99
|
+
|
|
100
|
+
### Changed
|
|
101
|
+
|
|
102
|
+
- `utils/api_client.py` module docstring updated to document WebSocket and gRPC as
|
|
103
|
+
explicitly not supported, with guidance on alternatives
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## [1.0.0] — 2026-07-04
|
|
108
|
+
|
|
109
|
+
First stable release. Completes all 16 pre-deployment gaps identified in `GAP_TRACKER.md`.
|
|
110
|
+
|
|
111
|
+
### Added
|
|
112
|
+
|
|
113
|
+
**pip install mode (GAP-01)**
|
|
114
|
+
- `pyplaykit/` namespace package with explicit public API (`ApiClient`, `BasePage`, `ResponseValidator`, `AuthTokenManager`, `DataValidator`, `DbClient`, `BaseComponent`, `DataTable`, `FormField`, `Modal`, `get_logger`, DB isolation helpers)
|
|
115
|
+
- `pyplaykit/plugin.py` — all framework fixtures registered as a `pytest11` entry-point so `pip install pyplaykit` delivers fixtures without copying files
|
|
116
|
+
- `pyplaykit/cli.py` — `pyplaykit init` scaffolds `config/`, `test_data/`, `conftest.py`, and example test in a new project
|
|
117
|
+
- `--pyplaykit-config` CLI flag and `PYPLAYKIT_CONFIG` env var for config directory override
|
|
118
|
+
|
|
119
|
+
**Orchestration enforcement (GAP-16)**
|
|
120
|
+
- `orchestration/enforcer.py` — `OrchestrationEnforcer`: reorders collected tests into topological suite order; skips dependent suite tests when prerequisites fail
|
|
121
|
+
- `--pyplaykit-orchestration` flag enables enforcement (off by default for backward compatibility)
|
|
122
|
+
- `config/config.yaml` suite entries now support a `marker` field to map suite IDs to pytest markers
|
|
123
|
+
|
|
124
|
+
**Lazy Playwright startup (GAP-02)**
|
|
125
|
+
- `pytest_collection_finish` hook detects UI tests via `@pytest.mark.ui` or `--pyplaykit-browser`
|
|
126
|
+
- `has_ui_tests` session fixture; `playwright_manager` yields `None` when no UI tests are present
|
|
127
|
+
- Database-only and API-only test runs no longer start the Playwright runtime
|
|
128
|
+
|
|
129
|
+
**UI component abstraction (GAP-06)**
|
|
130
|
+
- `components/` package: `BaseComponent`, `DataTable`, `Modal`, `FormField`
|
|
131
|
+
- All actions root-scoped inside a configurable `root_selector`
|
|
132
|
+
|
|
133
|
+
**BasePage interaction methods (GAP-04)**
|
|
134
|
+
- `select_option`, `upload_file`, `press_key`, `key_chord`, `hover`, `drag_to`, `scroll_into_view`
|
|
135
|
+
- `switch_to_frame` (returns `BasePage` scoped to iframe via `_FramePage` adapter)
|
|
136
|
+
- `open_new_tab`, `get_tab(index)`, `wait_for_network_idle`
|
|
137
|
+
|
|
138
|
+
**Database test isolation (GAP-07)**
|
|
139
|
+
- `utils/db_fixtures.py`: `DbTransaction` (always-rollback), `DbSeeder` (INSERT + DELETE cleanup), `DbCleaner` (TRUNCATE CASCADE)
|
|
140
|
+
- `db_transaction`, `db_seed`, `db_clean` fixtures in `conftest.py` / `pyplaykit.plugin`; all yield `None` gracefully when no DB is configured
|
|
141
|
+
|
|
142
|
+
**DB connection pooling (GAP-09)**
|
|
143
|
+
- `utils/db_pool.py`: `DbConnectionPool` wrapping `psycopg2.pool.ThreadedConnectionPool`
|
|
144
|
+
- `db_pool` session fixture, `db_client` function fixture; xdist-safe (one pool per worker)
|
|
145
|
+
|
|
146
|
+
**API client modernisation (GAP-10)**
|
|
147
|
+
- Replaced `urllib` with `httpx`; `ApiClient` gains `transport=` injection point for testing
|
|
148
|
+
- Context manager support (`__enter__` / `__exit__` / `close()`)
|
|
149
|
+
|
|
150
|
+
**ResponseValidator expansion (GAP-11)**
|
|
151
|
+
- `assert_status_in`, `assert_jsonpath` (JMESPath), `assert_header`, `assert_header_contains`, `assert_pagination`, `assert_error_body`
|
|
152
|
+
|
|
153
|
+
**Auth token fixture (GAP-12)**
|
|
154
|
+
- `utils/auth_manager.py`: `AuthTokenManager` — lazy fetch, cache, 401-triggered refresh
|
|
155
|
+
- `auth_token_manager` and `auth_token` session fixtures
|
|
156
|
+
|
|
157
|
+
**Real integration test suite (GAP-13)**
|
|
158
|
+
- `tests/integration/framework/test_api_integration.py` — 16 tests against jsonplaceholder.typicode.com
|
|
159
|
+
- `tests/integration/framework/test_db_integration.py` — 16 tests against in-memory SQLite
|
|
160
|
+
- Integration tests excluded from standard `pytest` run via `norecursedirs`
|
|
161
|
+
|
|
162
|
+
**Self-healing locator guidance (GAP-05)**
|
|
163
|
+
- `docs/RESILIENCE_GUIDE.md`; `confidence_threshold` config key with inline documentation
|
|
164
|
+
- Warning logged when confidence drops below threshold
|
|
165
|
+
|
|
166
|
+
**Secrets management (GAP-15)**
|
|
167
|
+
- `python-dotenv` loaded at conftest startup (`override=False`)
|
|
168
|
+
- `.env.example` with all required env vars documented
|
|
169
|
+
|
|
170
|
+
**Semantic versioning (GAP-03)**
|
|
171
|
+
- `CHANGELOG.md` in Keep a Changelog format
|
|
172
|
+
- `scripts/build_internal_package.py` reads version from `pyproject.toml` automatically
|
|
173
|
+
|
|
174
|
+
### Changed
|
|
175
|
+
|
|
176
|
+
- `pyproject.toml` — added `httpx>=0.27.0`, `jmespath>=1.0.0` to declared dependencies; added `[project.entry-points."pytest11"]` and `[project.scripts]`; added `pyplaykit*` and `components*` to `packages.find`
|
|
177
|
+
- `pytest.ini` — removed internal project markers; added `--cov=pyplaykit --cov=components`; `norecursedirs = tests/integration`
|
|
178
|
+
- `config/config.yaml` — added `database.pool_*` keys, `resilience.confidence_threshold`, `orchestration.suites[].marker`
|
|
179
|
+
- `conftest.py` — added `--pyplaykit-config`, `--pyplaykit-orchestration` options; lazy `playwright_manager`; all new fixtures
|
|
180
|
+
|
|
181
|
+
### Fixed
|
|
182
|
+
|
|
183
|
+
- Removed empty root `__init__.py` that shadowed the `pyplaykit/` namespace package
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## [0.1.0] — 2026-07-04
|
|
188
|
+
|
|
189
|
+
Initial release of the PyPlayKit enterprise automation framework.
|
|
190
|
+
|
|
191
|
+
### Added
|
|
192
|
+
|
|
193
|
+
**Core engine**
|
|
194
|
+
- `PlaywrightManager` — session-scoped Playwright lifecycle management
|
|
195
|
+
- `BrowserFactory` — cross-browser launch support (Chromium, Firefox, WebKit)
|
|
196
|
+
- `BasePage` — page object base class with resilience integration
|
|
197
|
+
|
|
198
|
+
**Utilities**
|
|
199
|
+
- `ApiClient` — HTTP client with retry logic and observability hooks
|
|
200
|
+
- `ResponseValidator` — HTTP response assertion helpers
|
|
201
|
+
- `DataValidator` — record-level field, type, and value assertions
|
|
202
|
+
- `DbClient` / `DbClientFactory` — multi-database client with factory pattern (PostgreSQL, MySQL, SQLite, SQL Server, Oracle, DB2, Snowflake)
|
|
203
|
+
- `DbValidationHelper` — database-level assertion helpers including src/tgt migration comparison
|
|
204
|
+
- `TDM` — test data management with synthetic generation, masking, and environment provisioning
|
|
205
|
+
- `ObservabilityTracker` — session-level metrics, failure classification, KPI and persona reports
|
|
206
|
+
- `ConfigReader` — YAML-based environment-aware configuration resolution
|
|
207
|
+
- `EnvironmentValidator` — pre-suite readiness checks (URL, DB, API health)
|
|
208
|
+
|
|
209
|
+
**Plugin architecture**
|
|
210
|
+
- `PluginRegistry` — lifecycle hook dispatch (`on_session_start`, `on_test_result`, `on_session_finish`)
|
|
211
|
+
- Built-in plugins: `ApiPlugin`, `DataPlugin`, `SecurityPlugin`
|
|
212
|
+
|
|
213
|
+
**Orchestration**
|
|
214
|
+
- `build_orchestration_plan()` — dependency-aware suite planning with cycle detection and topological sort
|
|
215
|
+
|
|
216
|
+
**Self-healing locators**
|
|
217
|
+
- `resolve_visible_locator()` — fallback selector chain with confidence scoring and JSONL audit log
|
|
218
|
+
|
|
219
|
+
**Integrations**
|
|
220
|
+
- File and API adapters for Jira and test management export
|
|
221
|
+
|
|
222
|
+
**Configuration**
|
|
223
|
+
- `config/config.yaml` — framework defaults
|
|
224
|
+
- `config/environments.yaml` — multi-environment (dev, qa, uat, prod) URL and database config
|
|
225
|
+
- `config/projects/` — per-project configuration templates (timelyquote, dispatcho, customs_modernization)
|
|
226
|
+
|
|
227
|
+
**CI/CD**
|
|
228
|
+
- GitHub Actions pipeline: build → unit tests + security audit (parallel) → E2E smoke tests
|
|
229
|
+
- Separate workflows: `unit-tests.yml`, `build.yml`, `e2e-tests.yml`, `security-audit.yml`
|
|
230
|
+
- PyPI and Test PyPI publish workflows (tag-triggered)
|
|
231
|
+
|
|
232
|
+
**Security**
|
|
233
|
+
- Bandit static analysis, pip-audit dependency audit, Gitleaks secret scanning
|
|
234
|
+
- Self-bootstrapping security report scripts
|
|
235
|
+
|
|
236
|
+
**Documentation**
|
|
237
|
+
- 17 markdown guides covering architecture, API testing, data validation, multi-DB support, test organisation, QE visual guide, contributing guide, and quick-start
|
|
238
|
+
|
|
239
|
+
### Notes
|
|
240
|
+
- Resilience, TDM, orchestration, and integrations are **disabled by default** — enable in `config/config.yaml`
|
|
241
|
+
- Default database driver is PostgreSQL (`psycopg2-binary`); other drivers are optional installs
|
|
242
|
+
- Unit test coverage gate: 95%
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
[Unreleased]: https://github.com/ShanKonduru/pyplaykit/compare/v1.3.0...HEAD
|
|
247
|
+
[1.3.0]: https://github.com/ShanKonduru/pyplaykit/compare/v1.2.0...v1.3.0
|
|
248
|
+
[1.2.0]: https://github.com/ShanKonduru/pyplaykit/compare/v1.1.0...v1.2.0
|
|
249
|
+
[1.1.0]: https://github.com/ShanKonduru/pyplaykit/compare/v1.0.0...v1.1.0
|
|
250
|
+
[1.0.0]: https://github.com/ShanKonduru/pyplaykit/compare/v0.1.0...v1.0.0
|
|
251
|
+
[0.1.0]: https://github.com/ShanKonduru/pyplaykit/releases/tag/v0.1.0
|