[Testing] Feature matrix UITest Cases for MenuBarItem Control#34007
[Testing] Feature matrix UITest Cases for MenuBarItem Control#34007HarishKumarSF4517 wants to merge 14 commits intodotnet:mainfrom
Conversation
|
Hey there @@HarishKumarSF4517! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
|
/azp run maui-pr-uitests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
Adds a new MenuBarItem “Feature Matrix” page to the Controls TestCases HostApp and introduces a corresponding set of Appium-based UI feature tests (desktop-focused) to exercise MenuBarItem/menu flyout behavior.
Changes:
- Added a new FeatureMatrix page (
MenuBarItemControlPage) with XAML UI + code-behind for dynamic “Change Location” menu population and selection handling. - Added a new view model (
MenuBarItemViewModel) driving menu state, commands, and a locations collection. - Added a new FeatureMatrix UI test suite (
MenuBarItemFeatureTests) and registered the page in the gallery list.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/MenuBarItemFeatureTests.cs | New desktop-focused Appium UI tests for the MenuBarItem feature matrix page. |
| src/Controls/tests/TestCases.HostApp/FeatureMatrix/MenuBarItem/MenuBarItemViewModel.cs | View model backing the feature matrix page (menu text/enabled state, locations, commands). |
| src/Controls/tests/TestCases.HostApp/FeatureMatrix/MenuBarItem/MenuBarItemControlPage.xaml.cs | Code-behind for dynamic submenu population and location selection sync. |
| src/Controls/tests/TestCases.HostApp/FeatureMatrix/MenuBarItem/MenuBarItemControlPage.xaml | New XAML feature matrix UI for interacting with MenuBarItems and related controls. |
| src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs | Registers the new “MenuBarItem Feature Matrix” page in the gallery. |
src/Controls/tests/TestCases.HostApp/FeatureMatrix/MenuBarItem/MenuBarItemControlPage.xaml.cs
Show resolved
Hide resolved
src/Controls/tests/TestCases.HostApp/FeatureMatrix/MenuBarItem/MenuBarItemControlPage.xaml.cs
Show resolved
Hide resolved
src/Controls/tests/TestCases.HostApp/FeatureMatrix/MenuBarItem/MenuBarItemViewModel.cs
Show resolved
Hide resolved
src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/MenuBarItemFeatureTests.cs
Show resolved
Hide resolved
src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/MenuBarItemFeatureTests.cs
Show resolved
Hide resolved
src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/MenuBarItemFeatureTests.cs
Show resolved
Hide resolved
src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/MenuBarItemFeatureTests.cs
Outdated
Show resolved
Hide resolved
src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/MenuBarItemFeatureTests.cs
Show resolved
Hide resolved
🤖 AI Summary📊 Expand Full Review🔍 Pre-Flight — Context & Validation📝 Review Session — Addressed the copilot suggestions ·
|
| File | Type | Changes |
|---|---|---|
src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs |
Modified | +1 (registers new page in gallery) |
src/Controls/tests/TestCases.HostApp/FeatureMatrix/MenuBarItem/MenuBarItemControlPage.xaml |
New | +231 (XAML for feature matrix page) |
src/Controls/tests/TestCases.HostApp/FeatureMatrix/MenuBarItem/MenuBarItemControlPage.xaml.cs |
New | +113 (code-behind, Shell subclass) |
src/Controls/tests/TestCases.HostApp/FeatureMatrix/MenuBarItem/MenuBarItemViewModel.cs |
New | +482 (ViewModel with commands/locations) |
src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/MenuBarItemFeatureTests.cs |
New | +536 (22 UI tests) |
Key Findings
PR Overview:
The PR adds a new "MenuBarItem Feature Matrix" page to the HostApp and 22 Appium-based UI tests that exercise MenuBarItem/menu flyout behavior on desktop. The MenuBarItemControlPage extends Shell (correct for MenuBarItem), backed by MenuBarItemViewModel using commands and an ObservableCollection of locations.
Platform Note:
Tests are entirely #if MACCATALYST || WINDOWS scoped. Some tests within are further guarded with #if WINDOWS or #if TEST_FAILS_ON_CATALYST. Android testing is NOT applicable for this PR – MenuBar is a desktop-only control.
Copilot PR Review Comments (8 total):
| Thread | Issue | Resolved | Actually Fixed? |
|---|---|---|---|
MenuBarItemControlPage.xaml.cs:94 |
OnLocationsCollectionChanged doesn't handle Reset action – old handlers leak on Locations.Clear() |
✅ Resolved | ❌ No fix in code |
MenuBarItemControlPage.xaml.cs:60 |
OnLocationPropertyChanged only handles IsSelected, not Name – submenu doesn't update on rename |
✅ Resolved | ❌ No fix in code |
MenuBarItemViewModel.cs:328 |
OnExit called Application.Current?.Quit() – terminates HostApp during tests |
✅ Resolved | ✅ Fixed (Quit commented out, now updates StatusMessage) |
MenuBarItemFeatureTests.cs:230 |
Disabled-menu tests used broad catch { Assert.Pass() } |
✅ Resolved | ✅ Fixed (now use #if TEST_FAILS_ON_CATALYST with Assert.That(elements, Is.Empty)) |
MenuBarItemFeatureTests.cs:441 |
WaitForNoElement("Custom Location") uses text as AutomationId |
✅ Resolved | ❌ No fix in code |
MenuBarItemFeatureTests.cs:163 |
Edit-location flow didn't tap ConfirmButton |
✅ Resolved | ✅ Fixed |
MenuBarItemFeatureTests.cs (typo) |
Test name: ResetRestolesDefaultLocations |
✅ Resolved (Outdated) | ✅ Fixed (ResetRestoresDefaultLocations) |
MenuBarItemFeatureTests.cs:37 |
MenuBarItem_FileMenuExit only opens File menu + screenshot, doesn't test Exit |
✅ Resolved | ❌ Still misleading name/comments |
Additional Observations:
MenuBarItemControlPagedoes NOT have an[Issue]attribute – consistent with other FeatureMatrix pages- Category
[Category(UITestCategories.Shell)]is reasonable (MenuBarItem is a Shell feature) OnResetcallsLocations.Clear()which firesNotifyCollectionChangedAction.Reset– the leaked PropertyChanged subscriptions will re-accumulate on each Reset callMenuBarItem_FileMenuExittest description says "click Exit" but only opens the File menu and callsVerifyScreenshot()
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| PR | PR #34007 | Adds 22 feature matrix UI tests for MenuBarItem (desktop-only) | ⏳ PENDING (Gate) | 5 files (+1363) | Original PR – test addition, not bug fix |
🚦 Gate — Test Verification
📝 Review Session — Addressed the copilot suggestions · a0f36d2
Result:
Platform Requested: android
Platform Available for Tests: MacCatalyst, Windows (desktop-only)
Mode: N/A – Test-only PR, no bug fix to verify
Explanation
This PR adds new test coverage (feature matrix tests) for MenuBarItem. It is NOT a bug fix PR. The standard Gate verification (tests FAIL without fix → PASS with fix) does not apply because:
- No fix files exist – there are no source code changes to revert/restore
- Tests are desktop-only – all tests are wrapped in
#if MACCATALYST || WINDOWSand will not compile on Android - Android testing is not applicable – MenuBar is a desktop control (Windows/MacCatalyst only)
Tests Exist: ✅ Yes
The PR includes 22 UI tests in MenuBarItemFeatureTests.cs targeting:
MenuBarItemControlPageHostApp page (Shell-based)MenuBarItemViewModelbacking
Platform Determination
Since no fix verification is possible, Gate is marked as NOT APPLICABLE. Code review findings from Pre-Flight document remaining concerns.
🔧 Fix — Analysis & Comparison
📝 Review Session — Addressed the copilot suggestions · a0f36d2
Status: SKIPPED – Test-only PR, no bug fix to explore alternatives for
This PR adds new test coverage for MenuBarItem. There are no fix files to revert/restore, so the try-fix exploration workflow does not apply.
Code quality issues were documented in Pre-Flight and are addressed in the Report phase.
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| PR | PR #34007 | Adds 22 feature matrix UI tests for MenuBarItem | N/A (test-only) | 5 files (+1363) | No bug fix – try-fix not applicable |
Exhausted: N/A
Selected Fix: PR's tests (only candidate – test addition PR)
📋 Report — Final Recommendation
📝 Review Session — Addressed the copilot suggestions · a0f36d2
⚠️ Final Recommendation: REQUEST CHANGES
Summary
PR #34007 adds a feature matrix test page and 22 UI tests for MenuBarItem (desktop-only: Windows and MacCatalyst). The PR is a test addition — no source code fixes are included. Several code issues from the Copilot review were addressed, but three significant issues remain unresolved in the current code.
Title & Description Review
Title: [Testing] Feature matrix UITest Cases for MenuBarItem Control ✅ Accurate
Description Issues:
- ❌ Missing required NOTE block — All PRs must include the community testing NOTE at the top of the description. Current description is missing:
> [!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](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you!
Code Review Findings
🔴 Critical Issues
1. Memory leak: OnLocationsCollectionChanged doesn't handle NotifyCollectionChangedAction.Reset
- File:
MenuBarItemControlPage.xaml.cs:74 - Problem:
OnReset()in the ViewModel callsLocations.Clear()which firesNotifyCollectionChangedAction.Reset. On this action,e.OldItemsisnull, so thePropertyChangedevent handlers on the three oldLocationItemobjects are never detached. Every call to the Reset button leaks 3 handlers. - Fix: Handle the
Resetaction explicitly:private void OnLocationsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e) { if (e.Action == NotifyCollectionChangedAction.Reset) { // Unsubscribe from all tracked items (need to track them separately) // Or: unsubscribe from all, re-subscribe to all current items foreach (var location in _viewModel.Locations) location.PropertyChanged -= OnLocationPropertyChanged; } // existing New/Old item handling...
2. False-positive test assertion: WaitForNoElement("Custom Location") uses AutomationId lookup
- File:
MenuBarItemFeatureTests.cs:440 - Problem:
App.WaitForNoElement(string marked)callsFindElement(id)which searches by AccessibilityId/AutomationId — NOT by display text. Since no element hasAutomationId="Custom Location", this assertion will always pass immediately, even if "Custom Location" is still visible on screen. - Fix: Use a text-based query:
// Instead of: App.WaitForNoElement("Custom Location"); // Use: App.WaitForNoElement(x => x.FindElementByText("Custom Location"));
🟡 Suggestions
3. MenuBarItem_FileMenuExit test does not test Exit
- File:
MenuBarItemFeatureTests.cs:22-37 - Problem: The test is named
MenuBarItem_FileMenuExitand comments say "Open File menu and click Exit", but the implementation only opens the File menu and callsVerifyScreenshot(). The Exit item is never tapped. This is misleading. - Suggestion: Rename to
MenuBarItem_FileMenuOpensor extend to actually tap Exit and verifyStatusMessagecontains "Exit command executed".
4. OnLocationPropertyChanged doesn't handle Name changes — submenu items stale after rename
- File:
MenuBarItemControlPage.xaml.cs:46 - Problem: When a location's
Nameis changed via edit, theChange Locationsubmenu items (which snapshotText = location.Name) are not updated. OnlyIsSelectedis handled. - Suggestion: Add
nameof(LocationItem.Name)handling to callPopulateLocationMenuItems():if (e.PropertyName == nameof(LocationItem.Name)) PopulateLocationMenuItems();
✅ Looks Good
OnExitcorrectly avoids callingApplication.Current?.Quit()— addresses the critical HostApp termination risk- Disabled menu tests use
#if TEST_FAILS_ON_CATALYSTguard with properAssert.That(elements, Is.Empty)assertions instead of broadcatch { Assert.Pass() } - Edit-location flow (
Order(7)) correctly tapsConfirmButtonand verifies the edited text - Test method
MenuBarItem_ResetRestoresDefaultLocationstypo is fixed - MacCatalyst menu rebuild trigger (
UIMenuSystem.MainSystem.SetNeedsRebuild()) is correctly gated on#if MACCATALYST - Platform guards are appropriate: outer
#if MACCATALYST || WINDOWS, inner#if WINDOWSand#if TEST_FAILS_ON_CATALYST
Gate Result
N/A — This is a test-only PR with no bug fix. Standard Gate verification (fail without fix / pass with fix) does not apply. Tests are desktop-only (Windows/MacCatalyst) and cannot run on Android.
Changes Required Before Merge
- ❌ Add the required NOTE block to the PR description
- ❌ Fix
OnLocationsCollectionChangedto handleNotifyCollectionChangedAction.Reset(unsubscribe existing handlers before clear) - ❌ Fix
WaitForNoElement("Custom Location")to use a text-based query or the correct AutomationId ⚠️ (Suggested) FixMenuBarItem_FileMenuExittest name/behavior mismatch⚠️ (Suggested) FixOnLocationPropertyChangedto callPopulateLocationMenuItems()onNamechanges
📋 Expand PR Finalization Review
Title: ✅ Good
Current: [Testing] Feature matrix UITest Cases for MenuBarItem Control
Description: ✅ Good
Description needs updates. See details below.
✨ Suggested PR Description
[!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!
Description
This pull request adds a comprehensive feature matrix test page for MenuBarItem controls, enhancing UI test coverage for menu bar functionality on desktop platforms (Windows and MacCatalyst).
⚠️ Platform scope: All UI tests inMenuBarItemFeatureTests.csare gated on#if MACCATALYST || WINDOWS. A subset of screenshot-based tests (Orders 1–4) are additionally gated on#if WINDOWSonly.
New MenuBarItem Feature Matrix Page
CorePageView.cs — Registration
Added a new GalleryPageFactory entry for MenuBarItemControlPage to make it accessible from the test host app gallery.
MenuBarItemControlPage.xaml — HostApp UI
Introduces a Shell-rooted page with:
- A
Shell.MenuBarItemsdefinition containing fourMenuBarItementries: File, Locations, View, and MediaMenuBar - The Locations menu includes a
MenuFlyoutSubItem(ChangeLocationSubItem) dynamically populated from code-behind, aMenuFlyoutSeparator, and Add/Edit/Remove items - The MediaMenuBar demonstrates
FontImageSourceicons (Play, Pause, Stop) - Main content area: status labels, a location
Entrywith confirm/cancel, menu enable/disable switches, and aCollectionViewshowing available locations
MenuBarItemControlPage.xaml.cs — Code-behind
- Dynamically populates the
ChangeLocationSubItemfrom the ViewModel'sLocationscollection - Ensures single-selection behaviour: unchecks other locations when one is selected
- Subscribes to
CollectionChangedand per-itemPropertyChangedto keep the menu and selection state in sync - On MacCatalyst, calls
UIMenuSystem.MainSystem.SetNeedsRebuild()onLoadedto ensure menu bar visibility
MenuBarItemViewModel.cs — ViewModel
MVVM ViewModel (INotifyPropertyChanged) that drives the feature matrix page. Exposes:
- Properties for each menu item's
Text,IsEnabled, andIconImageSource ObservableCollection<LocationItem>with three default locations (Redmond, London, Berlin)- Commands:
ExitCommand,AddLocationCommand,EditLocationCommand,RemoveLocationCommand,ChangeLocationCommand,RefreshCommand,ConfirmEntryCommand,CancelEntryCommand,ResetCommand
MenuBarItemFeatureTests.cs — UI Tests (22 tests)
Cross-platform test class (_GalleryUITest) covering:
- Location selection, add, edit, remove via menu
- Dynamic submenu population
- Menu enable/disable (File, Locations, View)
- Reset to defaults
- Entry visibility toggling and empty-input validation
- All four menu bars present/functional
Issues Fixed
N/A — This is a new test addition, not a bug fix.
Platforms Tested
- iOS
- Android
- Windows
- MacCatalyst
Code Review: ⚠️ Issues Found
Code Review — PR #34007
🔴 Critical Issues
AutomationId vs. Text Mismatch in Tests
Files:
MenuBarItemControlPage.xaml(XAML AutomationIds)MenuBarItemViewModel.cs(Text property default values)MenuBarItemFeatureTests.cs(element locators)
Problem:
App.WaitForElement(...) in the tests uses strings like "ExitMenuBarFlyoutItem" and "RefreshMenuBarFlyoutItem", but the XAML AutomationId attributes are set to "ExitMenuFlyoutItem" and "RefreshMenuFlyoutItem" (without "Bar"). The tests are actually finding elements by their Text value (set via ViewModel default strings _exitText = "ExitMenuBarFlyoutItem") rather than by AutomationId.
This works on Windows/MacCatalyst because Appium locates native menu items by display text on those platforms, but it makes the intent ambiguous and breaks the convention of locating by AutomationId.
Specific mismatches:
| XAML AutomationId | ViewModel Text default | Test locator string |
|---|---|---|
ExitMenuFlyoutItem |
"ExitMenuBarFlyoutItem" |
"ExitMenuBarFlyoutItem" ← finds by text |
RefreshMenuFlyoutItem |
(no override — text is {Binding RefreshText}) |
"RefreshMenuBarFlyoutItem" |
Recommendation:
Either align AutomationIds to match the test locator strings, or explicitly document in comments that these are Text-based lookups (and why AutomationId cannot be used for native menu items on desktop). Using App.FindElementByText(...) for text-based lookups would make the intent explicit.
🟡 Moderate Issues
1. Memory Leak Risk — No Event Unsubscription
File: MenuBarItemControlPage.xaml.cs
Problem:
The constructor subscribes to _viewModel.Locations.CollectionChanged and to PropertyChanged on each LocationItem. There is no Unloaded handler or OnDisappearing override to unsubscribe. While this is test infrastructure (not production code) and the page is typically short-lived, it is still best practice in MAUI to unsubscribe from event handlers to prevent retained references.
// Missing cleanup:
this.Unloaded += (s, e) =>
{
_viewModel.Locations.CollectionChanged -= OnLocationsCollectionChanged;
foreach (var location in _viewModel.Locations)
location.PropertyChanged -= OnLocationPropertyChanged;
};2. Misleading Test Name
File: MenuBarItemFeatureTests.cs, Order(13)
Problem:
MenuBarItem_MenuTextBindingUpdates doesn't actually test that text updates via binding (i.e., it never changes a ViewModel property and verifies the UI reflects it). It only verifies that menus can be opened and their static items exist. The name implies a dynamic binding scenario that isn't tested.
Recommendation: Rename to MenuBarItem_VerifyAllMenusAndItemsAccessible or implement an actual text binding update test (change a MenuText property in the ViewModel and verify the menu bar title updates).
3. Missing Newlines at End of Files
Files:
MenuBarItemControlPage.xaml(\ No newline at end of file)MenuBarItemControlPage.xaml.cs(\ No newline at end of file)MenuBarItemFeatureTests.cs(\ No newline at end of file)
Recommendation: Add a trailing newline to all three files. This is a standard convention in the repo and commonly flagged in CI.
✅ Looks Good
- Structure follows feature matrix pattern —
_GalleryUITestbase class,GalleryPageNameregistration inCorePageView.cs, and ViewModel-backed HostApp page all match existing feature matrix tests. - MacCatalyst menu rebuild workaround —
UIMenuSystem.MainSystem.SetNeedsRebuild()onLoadedis a known-correct pattern for ensuring menu bar visibility on MacCatalyst. TEST_FAILS_ON_CATALYSTguard — Tests 10–12 (disable-menu tests) are correctly gated with a link to issue [macOS] IsEnabled property false not working on MenuBarItem #34038. This is the right pattern for known failing tests.OnLocationsCollectionChangedcorrectly subscribes/unsubscribesPropertyChangedfor newly added/removed items, demonstrating awareness of the event pattern.ResetButtonat start of each test provides good isolation between ordered tests.- 22 tests cover a broad range of MenuBarItem interactions: add, edit, remove, select location, toggle enable/disable, verify initial state, entry visibility, empty validation.
- Platform guard
#if MACCATALYST || WINDOWScorrectly scopes the entire test file to desktop platforms only.
I have addressed the requested changes,
|
|
/azp run maui-pr-uitests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
00b329b to
ff87486
Compare
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 34007Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 34007" |
🚦 Gate — Test Verification📊 Expand Full Gate —
|
| Test | Without Fix (expect FAIL) | With Fix (expect PASS) |
|---|---|---|
🖥️ MenuBarItemFeatureTests MenuBarItemFeatureTests |
✅ FAIL — 2140s | ❌ FAIL — 510s |
🔴 Without fix — 🖥️ MenuBarItemFeatureTests: FAIL ✅ · 2140s
(truncated to last 15,000 chars)
TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at AndroidDeviceExtensions.PushAndInstallPackageAsync(AndroidDevice device, PushAndInstallCommand command, CancellationToken token) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at AndroidDeviceExtensions.PushAndInstallPackageAsync(AndroidDevice device, PushAndInstallCommand command, CancellationToken token) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at Xamarin.Android.Tasks.FastDeploy.InstallPackage(Boolean installed) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at Xamarin.Android.Tasks.FastDeploy.InstallPackage(Boolean installed) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at Xamarin.Android.Tasks.FastDeploy.RunInstall() [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
Build FAILED.
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: Mono.AndroidTools.InstallFailedException: Unexpected install output: cmd: Failure calling service package: Broken pipe (32) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass105_0.<InstallPackage>b__0(Task`1 t) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: --- End of stack trace from previous location --- [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: --- End of stack trace from previous location --- [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at AndroidDeviceExtensions.PushAndInstallPackageAsync(AndroidDevice device, PushAndInstallCommand command, CancellationToken token) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at AndroidDeviceExtensions.PushAndInstallPackageAsync(AndroidDevice device, PushAndInstallCommand command, CancellationToken token) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at Xamarin.Android.Tasks.FastDeploy.InstallPackage(Boolean installed) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at Xamarin.Android.Tasks.FastDeploy.InstallPackage(Boolean installed) [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
/home/vsts/work/1/s/.dotnet/packs/Microsoft.Android.Sdk.Linux/36.1.2/tools/Xamarin.Android.Common.Debugging.targets(333,5): error ADB0010: at Xamarin.Android.Tasks.FastDeploy.RunInstall() [/home/vsts/work/1/s/src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj::TargetFramework=net10.0-android]
0 Warning(s)
1 Error(s)
Time Elapsed 00:15:45.01
* daemon not running; starting now at tcp:5037
* daemon started successfully
Determining projects to restore...
All projects are up-to-date for restore.
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net10.0-android36.0/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net10.0-android36.0/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net10.0-android36.0/Microsoft.Maui.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
Maps -> /home/vsts/work/1/s/artifacts/bin/Maps/Debug/net10.0-android36.0/Microsoft.Maui.Maps.dll
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net10.0-android36.0/Microsoft.Maui.Controls.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
Microsoft.AspNetCore.Components.WebView.Maui -> /home/vsts/work/1/s/artifacts/bin/Microsoft.AspNetCore.Components.WebView.Maui/Debug/net10.0-android36.0/Microsoft.AspNetCore.Components.WebView.Maui.dll
Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.Maps/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Maps.dll
Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.Foldable/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Foldable.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.Xaml/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Xaml.dll
Controls.TestCases.HostApp -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Controls.TestCases.HostApp.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
Graphics -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
Essentials -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
Core -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Maps.dll
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Xaml.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Foldable.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Maps.dll
Microsoft.AspNetCore.Components.WebView.Maui -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.AspNetCore.Components.WebView.Maui.dll
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:08:37.23
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
Determining projects to restore...
Restored /home/vsts/work/1/s/src/Controls/tests/CustomAttributes/Controls.CustomAttributes.csproj (in 1.23 sec).
Restored /home/vsts/work/1/s/src/TestUtils/src/VisualTestUtils/VisualTestUtils.csproj (in 16 ms).
Restored /home/vsts/work/1/s/src/TestUtils/src/VisualTestUtils.MagickNet/VisualTestUtils.MagickNet.csproj (in 4.36 sec).
Restored /home/vsts/work/1/s/src/Controls/tests/TestCases.Android.Tests/Controls.TestCases.Android.Tests.csproj (in 6 sec).
Restored /home/vsts/work/1/s/src/TestUtils/src/UITest.Core/UITest.Core.csproj (in 2 ms).
Restored /home/vsts/work/1/s/src/TestUtils/src/UITest.Appium/UITest.Appium.csproj (in 2 ms).
Restored /home/vsts/work/1/s/src/TestUtils/src/UITest.NUnit/UITest.NUnit.csproj (in 402 ms).
Restored /home/vsts/work/1/s/src/TestUtils/src/UITest.Analyzers/UITest.Analyzers.csproj (in 2.29 sec).
5 of 13 projects are up-to-date for restore.
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
Controls.CustomAttributes -> /home/vsts/work/1/s/artifacts/bin/Controls.CustomAttributes/Debug/net10.0/Controls.CustomAttributes.dll
Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net10.0/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net10.0/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net10.0/Microsoft.Maui.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net10.0/Microsoft.Maui.Controls.dll
UITest.Core -> /home/vsts/work/1/s/artifacts/bin/UITest.Core/Debug/net10.0/UITest.Core.dll
UITest.Appium -> /home/vsts/work/1/s/artifacts/bin/UITest.Appium/Debug/net10.0/UITest.Appium.dll
UITest.NUnit -> /home/vsts/work/1/s/artifacts/bin/UITest.NUnit/Debug/net10.0/UITest.NUnit.dll
VisualTestUtils -> /home/vsts/work/1/s/artifacts/bin/VisualTestUtils/Debug/netstandard2.0/VisualTestUtils.dll
VisualTestUtils.MagickNet -> /home/vsts/work/1/s/artifacts/bin/VisualTestUtils.MagickNet/Debug/netstandard2.0/VisualTestUtils.MagickNet.dll
UITest.Analyzers -> /home/vsts/work/1/s/artifacts/bin/UITest.Analyzers/Debug/netstandard2.0/UITest.Analyzers.dll
Controls.TestCases.Android.Tests -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
Test run for /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll (.NETCoreApp,Version=v10.0)
VSTest version 18.0.1 (x64)
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
/home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET 10.0.0)
[xUnit.net 00:00:00.12] Discovering: Controls.TestCases.Android.Tests
[xUnit.net 00:00:00.42] Discovered: Controls.TestCases.Android.Tests
NUnit Adapter 4.5.0.0: Test execution started
Running selected tests in /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
NUnit3TestExecutor discovered 0 of 0 NUnit test cases using Current Discovery mode, Explicit run
NUnit Adapter 4.5.0.0: Test execution complete
No test matches the given testcase filter `MenuBarItemFeatureTests` in /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
🟢 With fix — 🖥️ MenuBarItemFeatureTests: FAIL ❌ · 510s
Determining projects to restore...
All projects are up-to-date for restore.
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net10.0-android36.0/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net10.0-android36.0/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net10.0-android36.0/Microsoft.Maui.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
Maps -> /home/vsts/work/1/s/artifacts/bin/Maps/Debug/net10.0-android36.0/Microsoft.Maui.Maps.dll
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net10.0-android36.0/Microsoft.Maui.Controls.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.Xaml/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Xaml.dll
Microsoft.AspNetCore.Components.WebView.Maui -> /home/vsts/work/1/s/artifacts/bin/Microsoft.AspNetCore.Components.WebView.Maui/Debug/net10.0-android36.0/Microsoft.AspNetCore.Components.WebView.Maui.dll
Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.Maps/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Maps.dll
Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.Foldable/Debug/net10.0-android36.0/Microsoft.Maui.Controls.Foldable.dll
Controls.TestCases.HostApp -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Controls.TestCases.HostApp.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
Graphics -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Graphics.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
Essentials -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
Core -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Maps.dll
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
Controls.Xaml -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Xaml.dll
Controls.Maps -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Maps.dll
Controls.Foldable -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.Maui.Controls.Foldable.dll
Microsoft.AspNetCore.Components.WebView.Maui -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.HostApp/Debug/net10.0-android/Microsoft.AspNetCore.Components.WebView.Maui.dll
Build succeeded.
0 Warning(s)
0 Error(s)
Time Elapsed 00:06:51.96
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
Broadcasting: Intent { act=android.intent.action.CLOSE_SYSTEM_DIALOGS flg=0x400000 }
Broadcast completed: result=0
Determining projects to restore...
All projects are up-to-date for restore.
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
Graphics -> /home/vsts/work/1/s/artifacts/bin/Graphics/Debug/net10.0/Microsoft.Maui.Graphics.dll
Controls.CustomAttributes -> /home/vsts/work/1/s/artifacts/bin/Controls.CustomAttributes/Debug/net10.0/Controls.CustomAttributes.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
Essentials -> /home/vsts/work/1/s/artifacts/bin/Essentials/Debug/net10.0/Microsoft.Maui.Essentials.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
Core -> /home/vsts/work/1/s/artifacts/bin/Core/Debug/net10.0/Microsoft.Maui.dll
Controls.BindingSourceGen -> /home/vsts/work/1/s/artifacts/bin/Controls.BindingSourceGen/Debug/netstandard2.0/Microsoft.Maui.Controls.BindingSourceGen.dll
##vso[build.updatebuildnumber]10.0.60-ci+azdo.13681892
Controls.Core -> /home/vsts/work/1/s/artifacts/bin/Controls.Core/Debug/net10.0/Microsoft.Maui.Controls.dll
UITest.Core -> /home/vsts/work/1/s/artifacts/bin/UITest.Core/Debug/net10.0/UITest.Core.dll
UITest.Appium -> /home/vsts/work/1/s/artifacts/bin/UITest.Appium/Debug/net10.0/UITest.Appium.dll
VisualTestUtils -> /home/vsts/work/1/s/artifacts/bin/VisualTestUtils/Debug/netstandard2.0/VisualTestUtils.dll
UITest.NUnit -> /home/vsts/work/1/s/artifacts/bin/UITest.NUnit/Debug/net10.0/UITest.NUnit.dll
VisualTestUtils.MagickNet -> /home/vsts/work/1/s/artifacts/bin/VisualTestUtils.MagickNet/Debug/netstandard2.0/VisualTestUtils.MagickNet.dll
UITest.Analyzers -> /home/vsts/work/1/s/artifacts/bin/UITest.Analyzers/Debug/netstandard2.0/UITest.Analyzers.dll
Controls.TestCases.Android.Tests -> /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
Test run for /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll (.NETCoreApp,Version=v10.0)
VSTest version 18.0.1 (x64)
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
/home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET 10.0.0)
[xUnit.net 00:00:00.17] Discovering: Controls.TestCases.Android.Tests
[xUnit.net 00:00:00.51] Discovered: Controls.TestCases.Android.Tests
NUnit Adapter 4.5.0.0: Test execution started
Running selected tests in /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
NUnit3TestExecutor discovered 0 of 0 NUnit test cases using Current Discovery mode, Explicit run
NUnit Adapter 4.5.0.0: Test execution complete
No test matches the given testcase filter `MenuBarItemFeatureTests` in /home/vsts/work/1/s/artifacts/bin/Controls.TestCases.Android.Tests/Debug/net10.0/Controls.TestCases.Android.Tests.dll
⚠️ Issues found
- ❌ MenuBarItemFeatureTests FAILED with fix (should pass)
📁 Fix files reverted (1 files)
eng/pipelines/ci-copilot.yml
🤖 AI Summary📊 Expand Full Review —
|
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| PR | PR #34007 | Adds 22 feature matrix UI tests for MenuBarItem (desktop-only) | ❌ FAILED (Gate — Android platform mismatch) | 5 files (+1363 lines) | Test-only PR; gate platform is wrong |
🔧 Fix — Analysis & Comparison
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| 1 | try-fix (claude-opus-4.6) | Handle NotifyCollectionChangedAction.Reset with _trackedLocations list in OnLocationsCollectionChanged |
⏸️ BLOCKED (compile ✅) | 1 file | Memory leak / duplicate subscription fix |
| 2 | try-fix (claude-sonnet-4.6) | Fix WaitForNoElement("Custom Location") text/AutomationId confusion; rename MenuBarItem_FileMenuExit → MenuBarItem_FileMenuOpens |
⏸️ BLOCKED (compile ✅) | 1 file | Test assertion correctness |
| 3 | try-fix (gpt-5.3-codex) | Add bounds guard in OnConfirmEntry() for stale _editingLocationIndex |
⏸️ BLOCKED (compile ✅) | 1 file | Defensive ViewModel fix |
| 4 | try-fix (gpt-5.4) | Add missing AutomationId to static XAML menu elements (FileMenuBar, LocationsMenuBar, ViewMenuBar, ExitMenuBarFlyoutItem, RefreshMenuBarFlyoutItem) |
⏸️ BLOCKED (compile ✅) | 1 file | Test wiring fix |
| 5 | try-fix (claude-sonnet-4.6) | Refactor MenuBarItemControlPage from Shell → ContentPage — removes Shell nesting; uses ContentPage.MenuBarItems (valid on base Page); removes MacCatalyst UIMenuSystem hack |
⏸️ BLOCKED (compile ✅) | 2 files | Most impactful: arch fix |
| 6 | try-fix (gpt-5.3-codex) | Add deterministic AutomationId to runtime-generated MenuFlyoutItem instances in PopulateLocationMenuItems() |
⏸️ BLOCKED (compile ✅) | 1 file | Dynamic item discoverability |
| 7 | try-fix (claude-sonnet-4.6) | Replace bound Label.Text with static strings to eliminate accessibility name collision between MenuBarItem and page-body Labels |
⏸️ BLOCKED (compile ✅) | 1 file | Prevents Appium finding wrong element |
| PR | PR #34007 | Adds 22 feature matrix UI tests for MenuBarItem (desktop-only) | ❌ FAILED (Gate — Android platform mismatch) | 5 files | Test-only PR; gate ran wrong platform |
Cross-Pollination
| Model | Round | New Ideas? | Details |
|---|---|---|---|
| claude-opus-4.6 | 2 | Yes | Shell→ContentPage refactor (attempt 5) |
| gpt-5.3-codex | 2 | Yes | Dynamic AutomationIds in PopulateLocationMenuItems (attempt 6) |
| claude-sonnet-4.6 | 2 | Yes | Label/MenuBarItem accessibility name collision (attempt 7) |
| claude-opus-4.6 | 3 | Yes | Alternative: keep Shell but fix hosting model (set as Window.Page); exceeds max rounds |
Exhausted: Yes (max 3 cross-pollination rounds reached)
Selected Fix: Combination of Attempt 5 + Attempt 1 + Attempt 7 as highest-priority fixes.
- Attempt 5 (Shell→ContentPage) is the most structurally important: all other FeatureMatrix pages use
ContentPage/NavigationPage. Nesting a Shell inside the gallery's own Shell is architecturally incorrect and will likely cause all menu tests to fail or produce unreliable results.Page.MenuBarItemsis defined on the basePageclass and works onContentPage. Compile-verified ✅. - Attempt 1 (Reset handler) fixes a memory leak that compounds on each
Reset. Compile-verified ✅. - Attempt 7 (label collision) fixes a test reliability issue where Appium could find the wrong element. Compile-verified ✅.
Note: All attempts are "Blocked" because the gate platform is Android and these tests only compile/run on Windows/MacCatalyst. This is a platform mismatch in the gate setup, not a defect in the fixes.
📋 Report — Final Recommendation
⚠️ Final Recommendation: REQUEST CHANGES
Phase Status
| Phase | Status | Notes |
|---|---|---|
| Pre-Flight | ✅ COMPLETE | Test-only PR, desktop-only (Windows/MacCatalyst), no linked issue |
| Gate | ❌ FAILED | Android platform — NOT applicable (tests are #if MACCATALYST || WINDOWS only) |
| Try-Fix | ✅ COMPLETE | 7 attempts, all ⏸️ Blocked (compile ✅; can't run desktop tests on Android) |
| Report | ✅ COMPLETE |
Summary
PR #34007 adds a new "MenuBarItem Feature Matrix" gallery page and 22 Appium UI tests for desktop MenuBarItem functionality. It is a test-only PR with no production code changes. The gate failure is a platform mismatch — the gate ran on Android, but all tests are guarded by #if MACCATALYST || WINDOWS and cannot run on Android. This should be re-gated on Windows or MacCatalyst.
However, 7 independent code quality issues were identified during the Try-Fix exploration, 3 of which are significant enough to block merge.
Root Cause
No production bug — this is a test addition PR. The issues found are in the new test code:
-
Architectural (HIGH):
MenuBarItemControlPageextendsShell— it is the only FeatureMatrix page that does. All 19+ other FeatureMatrix pages useContentPageorNavigationPage. Nesting a Shell inside the gallery's host Shell likely breaks the gallery navigation infrastructure and may cause all menu tests to fail or produce unreliable results at runtime. -
Memory Leak (MEDIUM):
OnLocationsCollectionChangeddoes not handleNotifyCollectionChangedAction.Reset.Locations.Clear()fires aResetwithe.OldItems == null, leaving oldPropertyChangedhandlers attached. SinceOnResetcallsLocations.Clear(), subscriptions accumulate on every reset operation. -
Test Reliability (MEDIUM):
MenuBarItem.Textand page-bodyLabel.Textare bound to the same ViewModel properties ("FileMenuBar","LocationsMenuBar","ViewMenuBar"). Appium'sWaitForElement(string)searches by accessibility name and may find the inert Label before the native MenuBar item, causingApp.Tap(...)to tap the wrong element silently. -
False Assertion (LOW):
App.WaitForNoElement("Custom Location")uses the display text as if it's an AutomationId. Since no element hasAutomationId="Custom Location", this trivially passes even if the item is still visible. -
Misleading Test (LOW):
MenuBarItem_FileMenuExitonly opens the File menu and callsVerifyScreenshot()— it never taps Exit. The name/comments are misleading. -
Missing AutomationIds (LOW): Several elements referenced by tests (
FileMenuBar,LocationsMenuBar,ViewMenuBar,ExitMenuBarFlyoutItem,RefreshMenuBarFlyoutItem) do not haveAutomationIdattributes in the XAML. Dynamic menu items inPopulateLocationMenuItems()also lackAutomationId. -
Defensive ViewModel (LOW):
OnConfirmEntry()edit path doesn't validate_editingLocationIndexis still within bounds before indexing intoLocations.
Fix Quality
The PR's approach is reasonable for a first pass, but several issues require fixes before merge:
Must Fix (blocks merge):
- Refactor
MenuBarItemControlPagefromShell→ContentPage(use<ContentPage.MenuBarItems>— valid on basePageclass). Remove the MacCatalystUIMenuSystem.SetNeedsRebuild()workaround which is a Shell-specific hack. (Attempt 5 — compile-verified ✅) - Fix
OnLocationsCollectionChangedto handleNotifyCollectionChangedAction.Reset. (Attempt 1 — compile-verified ✅) - Fix label/MenuBarItem accessibility name collision: labels at lines 133, 150, 167 must use different text than the MenuBarItem text values. (Attempt 7 — compile-verified ✅)
Should Fix (quality):
- Add
AutomationIdto static XAML menu elements and to dynamicMenuFlyoutIteminstances inPopulateLocationMenuItems(). (Attempts 4 and 6 — compile-verified ✅) - Fix
WaitForNoElement("Custom Location")and renameMenuBarItem_FileMenuExit. (Attempt 2 — compile-verified ✅)
Gate Note: The gate was run on Android which is the wrong platform for this PR. The gate result is NOT indicative of test correctness. The PR should be re-gated on Windows or MacCatalyst once the above issues are addressed.
Selected Fix: PR's fix (after required changes above are applied) — the overall test structure and ViewModel design are sound; the issues found are fixable with focused changes.
|
/azp run maui-pr-uitests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
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!
This pull request adds a new comprehensive feature matrix test page for
MenuBarItemcontrols, enhancing the test coverage for menu bar functionality in the application. The new page includes a rich XAML UI for interacting withMenuBarItemelements and associated controls, as well as supporting code-behind logic for dynamic menu item population and selection management.New MenuBarItem Feature Matrix Page:
Added a new entry for the
MenuBarItemControlPageto the list of feature matrix test pages, making it accessible from the test host app.Introduced the
MenuBarItemControlPage.xaml, featuring a detailed UI for testing and interacting withMenuBarItemelements, including dynamic menu items, status displays, entry fields, menu controls, and a locations collection view.Implemented
MenuBarItemControlPage.xaml.cswith logic to:MenuBarfeature.mp4