chore: Enhance logging, validation handling, and HR workflow tests#873
chore: Enhance logging, validation handling, and HR workflow tests#873Roopan-Microsoft merged 11 commits intodev-v4from
Conversation
test: dev-v4 to main PR
Added note for azd version 1.23.9 regarding preflight configuration.
docs: Add note for azd version 1.23.9 deployment
fix: upgraded the agent-framework to latest version
Updated logging for clarification input checks and added AI Thinking Process handling in various validation methods.
Added a test for the HR workflow to validate the Human Resources process steps. Updated function calls to use the correct naming convention for input methods.
There was a problem hiding this comment.
Pull request overview
This PR strengthens the Playwright-based E2E test harness under tests/e2e-test/ by adding HTML reporting + screenshot capture, improving UI synchronization around AI response completion, and adding a focused HR workflow smoke test to reduce debugging friction.
Changes:
- Added an HR-only E2E smoke test and updated RAI prompt sender method usage in the existing smoke suite.
- Enhanced BIABPage response validation to wait for an “AI Thinking Process” indicator and broadened RAI error-state detection.
- Enabled pytest-html reporting and added screenshot capture/attachment behavior via
conftest.py.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| tests/e2e-test/tests/test_MACAE_Smoke_test.py | Adds an HR-only workflow test and updates calls to the renamed RAI prompt send method. |
| tests/e2e-test/tests/conftest.py | Adds screenshot capture/attachment to pytest-html reports and filename sanitization utilities. |
| tests/e2e-test/pytest.ini | Enables HTML reporting via --html=report.html. |
| tests/e2e-test/pages/HomePage.py | Adds AI “thinking” synchronization, expands response content checks, changes task-plan approval clarification handling, and updates RAI error validation behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…treams usage in conftest.py
…d handling of ambiguous states
…d raise exceptions for required clarifications
|
🎉 This PR is included in version 4.1.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Purpose
This pull request significantly enhances the robustness and reliability of the E2E test suite for the HomePage by improving error handling, validation logic, and reporting. The changes include smarter handling of clarification steps, more resilient validation of AI-driven responses, comprehensive error detection, and improved HTML reporting with screenshot support.
Key improvements include:
Test robustness and error handling
approve_retail_task_plan,approve_rfp_task_plan,approve_contract_compliance_task_plan) to treat clarification input as a non-error condition (expected for some workflows), returning a boolean instead of raising exceptions. This prevents unnecessary test failures for valid scenarios. [1] [2] [3]validate_rai_error_messageto check for a wider range of error messages and fallback states, including silent rejections, and to capture screenshots for easier debugging.AI response validation and synchronization
Reporting and test infrastructure
--html=report.htmloption inpytest.ini.Minor improvements
These changes collectively make the test suite more stable, easier to debug, and provide richer feedback for failures.
Does this introduce a breaking change?
How to Test
What to Check
Verify that the following are valid
Other Information