Skip to content

Fix AnalyzeTests strict-mode crash on mixed page scripting results - #2391

Merged
Maria Zhelezova (mazhelez) merged 8 commits into
mainfrom
copilot/fix-analyzetests-crash
Oct 9, 2026
Merged

Maria Zhelezova (mazhelez) merged 8 commits into
mainfrom
copilot/fix-analyzetests-crash

Conversation

Copilot AI commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

❔What, Why & How

When a page scripting suite contains passed and failed tests, accessing .failure on passed testcases throws under strict mode, masking the failure report.

  • Guard: Check for the XML child with $testcase.SelectSingleNode('failure') before reading failure details.
  • Regression coverage: Cover mixed results—including 9 passed/2 failed—and skipped, all-passed, and all-failed cases. Assert counts, failure names, messages, and stack traces.
  • Release notes: Document the corrected behavior.

✅ Checklist

  • Add tests (E2E, unit tests)
  • Update RELEASENOTES.md
  • Update documentation (e.g. for new settings or scenarios) — Not applicable
  • Add telemetry — Not applicable

Co-authored-by: mazhelez <43066499+mazhelez@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix AnalyzeTests crash under strict mode when accessing failure property Fix AnalyzeTests strict-mode crash on mixed page scripting results Oct 6, 2026
@mazhelez

Copy link
Copy Markdown
Collaborator

Copilot resolve the merge conflicts in this pull request

…sts-crash

Co-authored-by: mazhelez <43066499+mazhelez@users.noreply.github.com>

Copilot AI commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

Copilot resolve the merge conflicts in this pull request

Resolved in 986f319 by merging the latest main, preserving the fix, regression tests, and both release-note entries. All 14 AnalyzeTests tests pass; GitHub no longer marks the PR as conflicted.

@mazhelez
Maria Zhelezova (mazhelez) marked this pull request as ready for review October 9, 2026 12:43
@mazhelez
Maria Zhelezova (mazhelez) requested a review from a team as a code owner October 9, 2026 12:43
Copilot AI balanced review requested due to automatic review settings October 9, 2026 12:43
@mazhelez

Copy link
Copy Markdown
Collaborator

Copilot please move the release notes above the v10.0 section in a new "Issues" section.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The targeted fix safely resolves the reported crash and includes comprehensive regression coverage.

0 open findings

What changed in this PR

Fixes strict-mode crashes when page scripting results contain both passed and failed tests.

Changes:

  • Safely checks for <failure> nodes before accessing failure details.
  • Adds regression coverage for mixed, skipped, all-passed, and all-failed results.
  • Documents the fix in release notes.
File Description
Actions/​AnalyzeTests/​TestResultAnalyzer.ps1 Guards failure-node access.
Tests/​AnalyzeTests.Test.ps1 Adds strict-mode regression tests.
RELEASENOTES.md Documents issue #2390 resolution.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Co-authored-by: mazhelez <43066499+mazhelez@users.noreply.github.com>

Copilot AI commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

Copilot please move the release notes above the v10.0 section in a new "Issues" section.

Moved the AnalyzeTests entry into a new top-level Issues section above v10.0 in d139425.

@mazhelez

Copy link
Copy Markdown
Collaborator

Copilot resolve the merge conflicts in this pull request

Copilot AI and others added 2 commits October 9, 2026 13:50
…sts-crash

Co-authored-by: mazhelez <43066499+mazhelez@users.noreply.github.com>
Co-authored-by: mazhelez <43066499+mazhelez@users.noreply.github.com>

Copilot AI commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

Copilot resolve the merge conflicts in this pull request

Merged the latest main into the branch in 46e19e2; Git merged cleanly with no conflicts. The release-note issues are consolidated under one heading in 751ba2b.

Comment thread RELEASENOTES.md Outdated
Co-authored-by: mazhelez <43066499+mazhelez@users.noreply.github.com>
@mazhelez
Maria Zhelezova (mazhelez) merged commit 7b407f5 into main Oct 9, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

5 participants