dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.28k stars 1.76k forks source link

[iOS][NativeAOT] Stand up testing on devices #19817

Open ivanpovazan opened 10 months ago

ivanpovazan commented 10 months ago

Description

With https://github.com/dotnet/maui/pull/19194 we started testing NativeAOT iOS support with MAUI on CI. However, added tests are only testing building MAUI iOS template applications. In order to have a better test coverage we should stand up running NativeAOT iOS tests on devices as well.

Tasks

This effort should cover at least the following:

ivanpovazan commented 10 months ago

/cc: @jonathanpeppers @simonrozsival We should discuss what will fall into TBD - Additional relevant testing but feel free to extend the list as you see fit.

ivanpovazan commented 10 months ago

Regarding:

Stand up running Core.DeviceTests.csproj tests with NativeAOT

In order to adapt these tests to execute with NativeAOT, we will need to adapt/change HeadlessTestRunner https://github.com/dotnet/maui/blob/c20f10de068e806158fa4436da3855e6bb9fc9d1/src/TestUtils/src/DeviceTests.Runners/HeadlessRunner/iOS/HeadlessTestRunner.cs#L13 as it inherits XHarness.TestRunners.Xunit test runner. The problem with this type of runners, is that it expects assemblies to be present on disk in order to load them and find relevant test cases. This is not supported by NativeAOT as the managed assemblies are not preserved during deployment.