Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows (packaged) Device tests for CI #15629

Merged
merged 9 commits into from
Jul 16, 2023
Merged

Windows (packaged) Device tests for CI #15629

merged 9 commits into from
Jul 16, 2023

Conversation

jfversluis
Copy link
Member

@jfversluis jfversluis commented Jun 14, 2023

This PR enables automated DeviceTests for packaged Windows apps for the following projects:

  • /src/Essentials/test/DeviceTests/Essentials.DeviceTests.csproj
  • /src/Graphics/tests/DeviceTests/Graphics.DeviceTests.csproj
  • /src/BlazorWebView/tests/MauiDeviceTests/MauiBlazorWebView.DeviceTests.csproj

We should also enable /src/Controls/tests/DeviceTests/Controls.DeviceTests.csproj & /src/Core/tests/DeviceTests/Core.DeviceTests.csproj, but that one seems to crash right now so that needs some work.

This PR adds the plumbing to run these tests through the pipeline and publish the test results.

Once this is merged we still need:

  • Enable /src/Controls/tests/DeviceTests/Controls.DeviceTests.csproj
  • Enable /src/Core/tests/DeviceTests/Core.DeviceTests.csproj (Enable WinUI Core Tests on CI #15885)
  • Disable/fix failing tests and write them up
  • Add a run for unpackaged apps

This is tracked by #15530

@jfversluis jfversluis added platform/windows 🪟 legacy-area-desktop Windows / WinUI / Project Reunion & Mac Catalyst / macOS specifics (Menus & other Controls)) area-testing Unit tests, device tests labels Jun 14, 2023
@jfversluis jfversluis changed the title Windows UI tests for CI Windows Device tests for CI Jun 16, 2023
@rmarinho rmarinho requested review from PureWeen and rmarinho June 21, 2023 15:33
@PureWeen PureWeen requested a review from mandel-macaque July 6, 2023 16:50
@jfversluis jfversluis changed the title Windows Device tests for CI Windows (packaged) Device tests for CI Jul 12, 2023
<Identity
Name="2C0C8B63-C6D1-48CC-A934-5108983E28EE"
Publisher="CN=User Name"
Version="1.0.0.0" />
<Identity Publisher="CN=User Name" />
Copy link
Member Author

Choose a reason for hiding this comment

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

Not hardcoding this will make it pick up the application ID from the csproj through single project

Name="2C0C8B63-C6D1-48CC-A934-5108983E28CB"
Name="maui-package-name-placeholder"
Copy link
Member Author

Choose a reason for hiding this comment

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

Not hardcoding this will make it pick up the application ID from the csproj through single project

@jfversluis jfversluis marked this pull request as ready for review July 12, 2023 11:59
@jfversluis jfversluis requested a review from a team as a code owner July 13, 2023 08:45
@jfversluis
Copy link
Member Author

See #15530 for a TODO list of tests and test projects we need to look at after this is merged

Comment on lines +25 to +26

public static bool RunHeadless = false;
Copy link
Member

Choose a reason for hiding this comment

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

Not sure that this is still needed. No references in this PR.

Suggested change
public static bool RunHeadless = false;

Copy link
Member

@mattleibow mattleibow left a comment

Choose a reason for hiding this comment

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

Let's get this in and then we can perfect them later. Thanks for the iterations! Finally good to have tests running on all the things.

@jfversluis jfversluis enabled auto-merge (squash) July 16, 2023 17:49
@jfversluis jfversluis merged commit 5560732 into main Jul 16, 2023
@jfversluis jfversluis deleted the windows-ui-tests branch July 16, 2023 19:06
@PureWeen
Copy link
Member

/backport to net7.0

@github-actions
Copy link
Contributor

Started backporting to net7.0: https://github.com/dotnet/maui/actions/runs/5572031588

@github-actions
Copy link
Contributor

@PureWeen backporting to net7.0 failed, the patch most likely resulted in conflicts:

$ git am --3way --ignore-whitespace --keep-non-patch changes.patch

Applying: Build & Run Packaged Windows DeviceTests
.git/rebase-apply/patch:156: trailing whitespace.
	
warning: 1 line adds whitespace errors.
Using index info to reconstruct a base tree...
A	eng/devices/windows.cake
M	eng/pipelines/common/device-tests-steps.yml
M	eng/pipelines/common/device-tests.yml
M	eng/pipelines/device-tests.yml
Falling back to patching base and 3-way merge...
Auto-merging eng/pipelines/device-tests.yml
Auto-merging eng/pipelines/common/device-tests.yml
CONFLICT (content): Merge conflict in eng/pipelines/common/device-tests.yml
Auto-merging eng/pipelines/common/device-tests-steps.yml
CONFLICT (content): Merge conflict in eng/pipelines/common/device-tests-steps.yml
CONFLICT (modify/delete): eng/devices/windows.cake deleted in HEAD and modified in Build & Run Packaged Windows DeviceTests. Version Build & Run Packaged Windows DeviceTests of eng/devices/windows.cake left in tree.
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Build & Run Packaged Windows DeviceTests
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

@github-actions
Copy link
Contributor

@PureWeen an error occurred while backporting to net7.0, please check the run log for details!

Error: git am failed, most likely due to a merge conflict.

jfversluis added a commit that referenced this pull request Aug 15, 2023
* Build & Run Packaged Windows DeviceTests

* Disable running for Core

* Skip failing tests

* Skip Launcher tests

* Update Launcher_Tests.cs

* Update windows.cake

* Revert "Update windows.cake"

This reverts commit f94dfdd.

* Update windows.cake
github-actions bot pushed a commit that referenced this pull request Aug 18, 2023
* Build & Run Packaged Windows DeviceTests

* Disable running for Core

* Skip failing tests

* Skip Launcher tests

* Update Launcher_Tests.cs

* Update windows.cake

* Revert "Update windows.cake"

This reverts commit f94dfdd.

* Update windows.cake
github-actions bot pushed a commit that referenced this pull request Aug 21, 2023
* Build & Run Packaged Windows DeviceTests

* Disable running for Core

* Skip failing tests

* Skip Launcher tests

* Update Launcher_Tests.cs

* Update windows.cake

* Revert "Update windows.cake"

This reverts commit f94dfdd.

* Update windows.cake
jfversluis added a commit that referenced this pull request Aug 22, 2023
* Windows (packaged) Device tests for CI (#15629)

* Build & Run Packaged Windows DeviceTests

* Disable running for Core

* Skip failing tests

* Skip Launcher tests

* Update Launcher_Tests.cs

* Update windows.cake

* Revert "Update windows.cake"

This reverts commit f94dfdd.

* Update windows.cake

* Enable WinUI Core Tests on CI (#15885)

* Fix WinUI test issues

* - enable core tests

* - core test fixes

* - ignore semantics tests

* - fix

* - syntax errors

* Correct merge mistake

* Make it work?

* Fix some tests

* Fix WebView tests

* Essentials & Graphics Windows app id fix

* Update TestUtils.DeviceTests.Runners.csproj

* Revert "Update TestUtils.DeviceTests.Runners.csproj"

This reverts commit bec734e.

* Set correct TFMs for DeviceTests

---------

Co-authored-by: Shane Neuville <shneuvil@microsoft.com>
@github-actions github-actions bot locked and limited conversation to collaborators Dec 9, 2023
@Eilon Eilon added t/desktop The issue relates to desktop scenarios (MacOS/MacCatalyst/Windows/WinUI/WinAppSDK) and removed legacy-area-desktop Windows / WinUI / Project Reunion & Mac Catalyst / macOS specifics (Menus & other Controls)) labels May 10, 2024
@samhouts samhouts added the fixed-in-8.0.0-preview.7.8842 Look for this fix in 8.0.0-preview.7.8842! label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-testing Unit tests, device tests fixed-in-8.0.0-preview.7.8842 Look for this fix in 8.0.0-preview.7.8842! platform/windows 🪟 t/desktop The issue relates to desktop scenarios (MacOS/MacCatalyst/Windows/WinUI/WinAppSDK)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants