Skip to content

[Visual Regression Tests] Fix xUnit error for updates & improve test workflow#556

Merged
Anna Malchow-Perryman (apman) merged 4 commits into
masterfrom
agents/xunit-update-baselines-issue
Jun 18, 2026
Merged

[Visual Regression Tests] Fix xUnit error for updates & improve test workflow#556
Anna Malchow-Perryman (apman) merged 4 commits into
masterfrom
agents/xunit-update-baselines-issue

Conversation

@apman

@apman Anna Malchow-Perryman (apman) commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

What changed

Error fixed

  • Fixed xUnit v3 catastrophic discovery/execution failure when UPDATE_BASELINES=true by moving startup warning output off stdout.

Improved usability of test commands

  • Added scripts/test.sh wrapper to run dotnet test with:
    • shorthand filter support (--filter EditableCombo => DisplayName~EditableCombo)
    • deduplicated visual regression summary printed at end in aligned columns.
  • Updated README.md test usage to document the new wrapper script.

Why

  • xUnit v3 uses stdout for its test process protocol; writing banner text there can break test startup.
  • Visual test failures produced noisy repeated lines; the wrapper makes regression output easier to scan without changing test behavior or exit codes.

Reviewer notes

  • scripts/test.sh is optional; raw dotnet test behavior is unchanged.
  • Wrapper preserves dotnet test exit code and supports explicit filter expressions unchanged.

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.

Pull request overview

This PR improves the visual regression testing workflow by preventing xUnit v3 startup/protocol issues caused by writing warning banners to stdout, while also adding an optional wrapper script to make visual regression failures easier to scan.

Changes:

  • Moved UPDATE_BASELINES=true warning output to stderr and deduplicated it across xUnit discovery/execution via a temp-file sentinel.
  • Refactored screenshot capture/compare to use a helper method and updated failure reporting to support the wrapper’s summary parsing.
  • Added scripts/test.sh wrapper for dotnet test to support shorthand filters and print a deduplicated visual-regression summary; documented it in README.md.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
tests/Devolutions.AvaloniaControls.VisualTests/VisualRegressionTests.cs Refactors capture/compare and moves baseline-update warnings to stderr with deduplication logic.
scripts/test.sh Adds an optional dotnet test wrapper that normalizes filters and prints a deduplicated visual-regression summary.
README.md Documents the new wrapper script usage for tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@apman Anna Malchow-Perryman (apman) changed the title tests: improve visual regression baseline workflow output [Visual Regression Tests] Fix xUnit error for updates & improve test workflow Jun 18, 2026
Make baseline-update banner sentinel file handling best-effort so module initialization cannot fail when temp file I/O is unavailable.

Also remove duplicate stderr emission from visual test failures and rely on Assert.Fail messages, which keeps both raw dotnet output and scripts/test.sh summary output less noisy.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

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.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

@apman Anna Malchow-Perryman (apman) marked this pull request as ready for review June 18, 2026 20:03
@apman Anna Malchow-Perryman (apman) merged commit 0c6f609 into master Jun 18, 2026
1 check passed
@apman Anna Malchow-Perryman (apman) deleted the agents/xunit-update-baselines-issue branch June 18, 2026 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants