Skip to content

test: remediate flaky delayed-content WPF UI test #191

Open

Description

@cmalpass

Summary

The hosted Windows Build and Test workflow had one intermittent WPF UI test failure on commit 064966678ebc4bfaffc11b482e1dd5645a17a097.

Failure

  • Workflow run: https://github.com/cmalpass/clif/actions/runs/33590818457
  • Job: WPF UI Tests
  • Test: CLIF.Tests.WpfUI.WpfUiIntegrationTests.DelayedContent_WhenInvoked_ShouldBecomeAutomationVisible
  • Location: CLIF.Tests/WpfUI/WpfUiIntegrationTests.cs:178
  • Result: 15 passed, 1 failed
  • Error: Expected object not to be <null>.

The failure occurs while immediately locating the Load delayed content button through UI Automation, before the button is invoked. The control is present in TestWpfApp/Views/ShellView.xaml as LoadDelayedContent.

Evidence

The same commit passed the release workflow's Windows verification, including the WPF UI suite. The other WPF tests in the failed hosted run also passed. This points to a timing-sensitive UI Automation tree/materialization race rather than a missing control or product build failure.

Proposed remediation

  • Locate the button by stable automation ID LoadDelayedContent.
  • Retry the UI Automation lookup with a bounded timeout before asserting it exists.
  • Keep the test failure-fast after the timeout so a real regression is still visible.
  • Run the WPF UI test repeatedly on hosted Windows runners and confirm the normal Build and Test workflow is green.

Acceptance criteria

  • DelayedContent_WhenInvoked_ShouldBecomeAutomationVisible passes reliably across repeated hosted Windows runs.
  • The test still fails with a useful diagnostic if the control never materializes.
  • No WPF UI tests are skipped or weakened to achieve a green workflow.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions