Skip to content

Quarantine evidence-backed flaky UI tests - #38777

Closed
kubaflo wants to merge 3 commits into
mainfrom
kubaflo-quarantine-flaky-ui-tests
Closed

kubaflo wants to merge 3 commits into
mainfrom
kubaflo-quarantine-flaky-ui-tests

Conversation

@kubaflo

@kubaflo kubaflo commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Summary

  • quarantines 126 exact method/platform UI test pairs with same-SHA or same-build/same-SHA fail -> pass evidence across main, net11.0, and release/10.0.1xx-sr11
  • keeps 41 parser-only screenshot recovery pairs enabled and records them separately instead of treating them as proven test failures
  • records 5 absent-on-main pairs in the committed inventory
  • adds src/Controls/tests/TestCases.Shared.Tests/Quarantine/ui-flake-quarantine-20260922.csv as the evidence inventory for every evaluated pair

What changed

  • added platform-specific FailsOn*WhenRunningOnXamarinUITest quarantines only where the handoff showed an exact same-build, same-SHA failure that later passed on retry
  • preserved healthy platforms for each test and did not add broad class/category disables or retry-based FlakyTestAttribute usage
  • left parser-only UITest.VerifyScreenshot InvalidOperationException recovery cases out of quarantine and marked them as parser-only-exclusion in the CSV
  • fixed the two Issue35736 MacCatalyst rows that had been misread as already excluded; they now carry explicit MacCatalyst quarantine attributes
  • added one follow-up Windows Shell quarantine from this PR's own CI: ShellFeatureTests.VerifyShellFlyout_FlyoutBehaviorLocked

Timeout rationale

The 3-hour Shell jobs were not caused by a single test hanging for 3 hours.

Task-log analysis showed the job was rerunning the full TestCategory=Shell suite after an earlier failure, and the second full invocation then ran into the job-level 180 minute cap while still making forward progress. That means the high-cost candidates here are the fast flaky failures that trigger a full-shell replay, not the last test name printed before cancellation.

Examples with especially strong cost justification covered by this PR include:

  • Issue26598.TabBarShouldbeVisibleNavigatingBackFromNonTabbedPage on MacCatalyst
  • Issue35736.SearchHandlerClearPlaceholderIconUpdatesAtRuntime on MacCatalyst
  • Issue35736.SearchHandlerQueryIconUpdatesAtRuntime on MacCatalyst
  • Issue34975.ShellTitleViewWithXNameShouldNotLeakMemory on MacCatalyst
  • ShellFeatureTests.VerifyShellFlyout_FlyoutBehaviorLocked on Windows (follow-up from build 1607420)

Scope limits

The current UI test infrastructure only exposes practical platform-level quarantine switches here, so runtime/API-lane-specific evidence had to be expressed as platform-wide excludes for the affected test. The CSV calls those cases out explicitly.

Validation

Build + discovery

Earlier validation for the main quarantine set rebuilt the Android, iOS, MacCatalyst, and WinUI UI-test projects and checked representative discovery across those platform assemblies.

Quarantine semantics

The skip mechanism in UITestIgnoreAttributes.cs is still active for the modern Appium/NUnit runner:

  • FailsOnWindowsWhenRunningOnXamarinUITest compiles to NUnit.Framework.IgnoreAttribute when the WinUI test project defines WINDOWS
  • the same attribute compiles to CategoryAttribute metadata on non-Windows test projects, preserving healthy platforms

For the PR follow-up Windows Shell fix, build 1607420 provided the runner-level proof:

  • failed task log 5431 shows VerifyShellFlyout_FlyoutIsPresented skipping immediately under the existing Windows quarantine while VerifyShellFlyout_FlyoutBehaviorLocked still executed and failed with System.TimeoutException
  • rerun task log 5496 shows that same VerifyShellFlyout_FlyoutBehaviorLocked method passing on the same build/SHA

That is the same Appium/NUnit execution path this PR uses for the added Windows-only quarantine.

Copilot AI lite review requested due to automatic review settings September 22, 2026 14:39
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 38777

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 38777"

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
There may be pipelines that require an authorized user to comment /azp run to run.

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.

Copilot review overview

🟡 Changes recommended

Correct the Issue35736 inventory entries and preserve the ShellFeatureMatrix state-reset sequence.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity · 1 Medium severity

Open (2)
What changed in this PR

This PR quarantines evidence-backed flaky UI test/platform pairs and records evaluated cases in a CSV inventory.

Changes:

  • Adds 123 targeted platform-specific quarantines.
  • Documents quarantined, parser-only, already-excluded, and absent-on-main cases.
  • Preserves unaffected platforms and avoids broad disables.
  • Moderate (3 votes): Two Issue35736 entries are incorrectly marked already excluded on MacCatalyst.
  • Critical (2 votes): Ignoring two ordered ShellFeatureMatrixTests removes required UI state resets.
File Reviewed change
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​KeyboardScrollingNonScrollingPageLargeTitlesTests.cs iOS quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​XFIssue/​ShellFlyoutSizing.cs MacCatalyst quarantines
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​XFIssue/​Issue9088.cs iOS quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​XFIssue/​Issue7396.cs MacCatalyst quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​IssueShell6738.cs MacCatalyst quarantines
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue7453.cs MacCatalyst quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue7045.cs MacCatalyst quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue36629.cs MacCatalyst quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue35844.cs iOS quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue35826.cs Android quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue35764.cs MacCatalyst quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue35736.cs MacCatalyst quarantines; inventory issue noted
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue35490.cs iOS quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue35416.cs MacCatalyst quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue35390.cs MacCatalyst quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue35088.cs MacCatalyst quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue34975.cs MacCatalyst quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue34931.cs MacCatalyst quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue34343.cs MacCatalyst quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue34143.cs MacCatalyst quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue34083.cs MacCatalyst quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue34038.cs MacCatalyst quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue33909.cs MacCatalyst quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue33772.cs MacCatalyst quarantines
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue33614.cs Android quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue33351.cs MacCatalyst quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue33227.cs MacCatalyst quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue33191.cs MacCatalyst quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue33038.cs Android quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue33037.cs MacCatalyst quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue32995.cs MacCatalyst quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue32994.cs MacCatalyst quarantines
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue32941.cs Android quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue32867.cs MacCatalyst quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue32583.cs MacCatalyst quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue32476.cs MacCatalyst quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue32419.cs MacCatalyst quarantines
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue32329.cs MacCatalyst quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue32223.cs Android quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue32219.cs MacCatalyst quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue30771.cs MacCatalyst quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue30728.cs MacCatalyst quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue30381.cs MacCatalyst quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue30254.cs MacCatalyst quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue29588.cs Windows quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue29492.cs MacCatalyst quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue29091Shell.cs MacCatalyst quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue28986_ContentPage.cs Android quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue28634.cs MacCatalyst quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue26598.cs MacCatalyst quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue24533.cs iOS quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue22306.cs Android quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue20855.cs MacCatalyst quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue20062.cs MacCatalyst quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Issue2004.cs MacCatalyst quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​Issues/​Bugzilla/​Bugzilla35472.cs Android quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​FeatureMatrix/​ShellTabbedPageFeatureTests.cs MacCatalyst quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​FeatureMatrix/​ShellSearchHandlerFeatureTests.cs Windows quarantines
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​FeatureMatrix/​ShellPagesFeatureTests.cs MacCatalyst and Windows quarantines
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​FeatureMatrix/​ShellNavigationFeatureTests.cs Windows quarantines
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​FeatureMatrix/​ShellFeatureMatrixTests.cs Windows quarantines; ordered-state reset issue noted
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​FeatureMatrix/​MenuBarItemFeatureTests.cs MacCatalyst quarantines
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​FeatureMatrix/​LabelFeatureTests.cs MacCatalyst quarantines
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​FeatureMatrix/​CollectionView_ScrollingFeatureTests.cs Android quarantines
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​FeatureMatrix/​CollectionView_HeaderFooterFeatureTests.cs Android quarantines
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​FeatureMatrix/​CollectionView_GroupingFeatureTests.cs Android quarantines
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​FeatureMatrix/​CollectionView_EmptyViewFeatureTests.cs Android quarantines
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​FeatureMatrix/​AbsoluteLayoutFeatureTests.cs iOS quarantines
src/​Controls/​tests/​TestCases.Shared.Tests/​Tests/​DragAndDropUITests.cs iOS quarantine
src/​Controls/​tests/​TestCases.Shared.Tests/​Quarantine/​ui-flake-quarantine-20260922.csv Evidence inventory; two entries require correction

Copilot AI review requested due to automatic review settings September 22, 2026 14:56

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.

Copilot review overview

🔵 Needs a closer look

The broad quarantine scope and unresolved ordered-test dependency require final human review.

Review effort: Lite
Findings: 1 High severity

Open (1)
Resolved since last review (1)

@kubaflo

kubaflo commented Sep 22, 2026

Copy link
Copy Markdown
Contributor Author

/azp run maui-pr-uitests, maui-pr-devicetests

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 2 pipeline(s).

Copilot AI review requested due to automatic review settings September 22, 2026 21:46

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.

Copilot review overview

🟡 Changes recommended

The ordered Windows ShellNavigation sequence can retain incorrect navigation state when quarantined tests are skipped.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)
Resolved since last review (1)


// Navigating event fires with Source=ShellItemChanged when switching flyout items.
[Test, Order(30)]
[FailsOnWindowsWhenRunningOnXamarinUITest("Flaky in CI (failed->passed on same SHA on release/10.0.1xx-sr11; see ui-flake-quarantine-20260922.csv). Re-enable after flakiness investigation.")]
@kubaflo

kubaflo commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

@kubaflo

kubaflo commented Sep 25, 2026

Copy link
Copy Markdown
Contributor Author

/rebase

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
kubaflo and others added 2 commits September 25, 2026 17:16
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 25, 2026 17:16
@github-actions
github-actions Bot force-pushed the kubaflo-quarantine-flaky-ui-tests branch from d0159f5 to 0e68dcd Compare September 25, 2026 17:16
@kubaflo

kubaflo commented Sep 25, 2026

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).

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.

Copilot review overview

🟡 Changes recommended

Ordered Shell tests can retain invalid state after skips, and Issue32329 loses applicable MacCatalyst coverage.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 2 High severity

Open (2)


[Test, Order(16)]
[Category(UITestCategories.Shell)]
[FailsOnMacWhenRunningOnXamarinUITest("Flaky in CI (failed->passed on same SHA on net11.0; see ui-flake-quarantine-20260922.csv). Re-enable after flakiness investigation.")]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants