chore: Enhance logging, validation handling, and HR workflow tests#873
Open
Harmanpreet-Microsoft wants to merge 11 commits intodev-v4from
Open
chore: Enhance logging, validation handling, and HR workflow tests#873Harmanpreet-Microsoft wants to merge 11 commits intodev-v4from
Harmanpreet-Microsoft wants to merge 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.
Contributor
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.
Contributor
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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