Skip to content

[Testing] Add Material3 test category and separate pipeline stage for android material3 UI tests#33409

Merged
rmarinho merged 12 commits intodotnet:mainfrom
NafeelaNazhir:lane_material3
Feb 13, 2026
Merged

[Testing] Add Material3 test category and separate pipeline stage for android material3 UI tests#33409
rmarinho merged 12 commits intodotnet:mainfrom
NafeelaNazhir:lane_material3

Conversation

@NafeelaNazhir
Copy link
Copy Markdown
Contributor

@NafeelaNazhir NafeelaNazhir commented Jan 7, 2026

This pull request adds support for running UI tests specifically targeting Material3 components on Android. It introduces new pipeline parameters and stages to enable Material3 builds and tests, updates artifact publishing logic to handle Material3-specific outputs, and adds a sample test case for a Material3 CheckBox. The changes ensure that Material3 tests are built, executed, and their results published separately from standard tests.

Pipeline and Build Enhancements:

  • Added a new useMaterial3 parameter to ui-tests-build-sample.yml and updated the build script to enable Material3 builds for Android when this parameter is set. [1] [2]
  • Modified artifact publishing logic in ui-tests-build-sample.yml to handle Material3-specific build and failure artifacts, ensuring separation from standard artifacts.

Pipeline Stage and Test Execution Updates:

  • Added dedicated build and test stages for Material3 in ui-tests.yml, including a new build stage (build_ui_tests_material3) for Android and a new test stage (android_ui_tests_material3) that downloads and runs Material3-specific tests. [1] [2]
  • Updated comments and category handling to clarify that Material3 has its own dedicated build and test stages.

Test Infrastructure and Sample Test:

  • Added a new Material3 test category to UITestCategories.cs for organizing Material3-specific tests.
  • Introduced a new sample XAML page (IssueMaterial3CheckBox.xaml and code-behind) and a corresponding UI test (IssueMaterial3CheckBoxTest.cs) to validate the default appearance of a Material3 CheckBox on Android. [1] [2] [3]

Pipeline stage:

image image

Test execution result:

image

@NafeelaNazhir NafeelaNazhir added area-testing Unit tests, device tests community ✨ Community Contribution labels Jan 7, 2026
@dotnet-policy-service dotnet-policy-service bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Jan 7, 2026
@sheiksyedm sheiksyedm marked this pull request as ready for review January 7, 2026 14:19
Copilot AI review requested due to automatic review settings January 7, 2026 14:19
@sheiksyedm sheiksyedm changed the title [Testing] Add Material3 test category and separate Android lane for Material3 UI tests [Testing] Add Material3 test category and separate pipeline stage for android material3 UI tests Jan 7, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request introduces infrastructure for running Material3-specific UI tests on Android by adding a new test category, dedicated pipeline stages, and a sample Material3 CheckBox test. The changes enable Material3 builds to be separated from standard test builds, ensuring proper isolation and validation of Material3 components.

  • Adds Material3 to UITestCategories for organizing Material3-specific tests
  • Introduces dedicated Material3 build and test stages in the Azure Pipeline (Android-only)
  • Implements Material3 build parameter (useMaterial3) that enables /p:UseMaterial3=true for Android builds
  • Adds sample Material3 CheckBox test with XAML page, code-behind, and screenshot verification

Reviewed changes

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

Show a summary per file
File Description
src/Controls/tests/TestCases.Shared.Tests/UITestCategories.cs Adds Material3 constant for test categorization
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/IssueMaterial3CheckBoxTest.cs Implements Android-specific test for Material3 CheckBox default appearance with screenshot verification
src/Controls/tests/TestCases.HostApp/Issues/IssueMaterial3CheckBox.xaml.cs Code-behind for Material3 CheckBox test page
src/Controls/tests/TestCases.HostApp/Issues/IssueMaterial3CheckBox.xaml XAML layout for Material3 CheckBox test with default state and AutomationIds
src/Controls/tests/TestCases.Android.Tests/snapshots/android/Material3CheckBox_DefaultAppearance.png Reference screenshot for Material3 CheckBox visual verification
eng/pipelines/common/ui-tests.yml Adds Material3 build stage and Android test stage with separate artifact handling and testFilter
eng/pipelines/common/ui-tests-build-sample.yml Implements useMaterial3 parameter with conditional build logic and Material3-specific artifact publishing

@@ -0,0 +1,25 @@
#if ANDROID
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

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

The test is wrapped in an #if ANDROID directive which limits it to Android only. According to the UI Testing Guidelines (CodingGuidelineID: 1000002), platform-specific directives should only be used when there is a specific technical limitation. Since Material3 is Android-specific by design (as indicated by the PlatformAffected.Android in the HostApp), this usage is acceptable. However, the guideline states to "document any platform-specific limitations with clear comments". Consider adding a comment above the directive explaining why this test is Android-only, such as: // Material3 is Android-specific

Copilot uses AI. Check for mistakes.
# Collect and publish Android Material3 snapshot diffs
- template: ui-tests-collect-snapshot-diffs.yml
parameters:
platform: 'Android Material3'
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

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

The platform name in the artifact parameters is 'Android Material3' with a space, which may cause issues with artifact naming or filtering. Consider using a consistent naming pattern without spaces, such as 'AndroidMaterial3' or 'Android-Material3', to match the pattern used in artifact names like 'uitest-snapshot-results-android-material3-...'.

Suggested change
platform: 'Android Material3'
platform: 'AndroidMaterial3'

Copilot uses AI. Check for mistakes.
@sheiksyedm
Copy link
Copy Markdown
Contributor

/azp run maui-pr-uitests 

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@sheiksyedm
Copy link
Copy Markdown
Contributor

/azp run maui-pr-uitests 

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@sheiksyedm
Copy link
Copy Markdown
Contributor

/azp run maui-pr-uitests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@sheiksyedm
Copy link
Copy Markdown
Contributor

/azp run maui-pr-uitests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@sheiksyedm
Copy link
Copy Markdown
Contributor

/azp run maui-pr-uitests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

This reverts commit 1a9533a.
@sheiksyedm
Copy link
Copy Markdown
Contributor

/azp run maui-pr-uitests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@sheiksyedm
Copy link
Copy Markdown
Contributor

/azp run maui-pr-uitests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@sheiksyedm
Copy link
Copy Markdown
Contributor

/azp run maui-pr-uitests 

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@sheiksyedm
Copy link
Copy Markdown
Contributor

/azp run maui-pr-uitests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

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

Labels

area-testing Unit tests, device tests community ✨ Community Contribution material3 partner/syncfusion Issues / PR's with Syncfusion collaboration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants