Conversation
|
cc: @mattleibow just in case you have something to add (: |
b8415ae to
f818c9d
Compare
f818c9d to
5513c8e
Compare
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <MauiXaml Update="Tests\UITests\StatusBarTestPage.xaml"> |
| public class BehaviorTest | ||
| { | ||
| [Fact] | ||
| public void SuccessfulTest() |
There was a problem hiding this comment.
Let's make it run on your CI first
* Run tests on Android * fix path * skip warnings * install android sdk * update nuget.config * fix build * use x86-x64 android emulator * use android x64 * ios maccatalyst * fix path * fix ios build * use xcode 14.3.1 * macos-13 * comment android * Run only on Mac
|
@pictos can we merge this PR as it is (with comments fixes)? |
This saves time by not attempting to re-build projects that were previously compiled when the Unit Tests ran. It also ensures that the project build step will fail alerting us immediately to the root cause of the CI pipeline failure.
|
It looks like it is forcing us to upgrade to Xcode 16 and iOS 18? Is this supported via Azure Pipelines? |
Yup! You need to do two things to add iOS 18 support to the library:
|
There was a problem hiding this comment.
Copilot reviewed 27 out of 42 changed files in this pull request and generated 3 suggestions.
Files not reviewed (15)
- samples/CommunityToolkit.Maui.Sample.sln: Language not supported
- src/CommunityToolkit.Maui.DeviceTests/App.xaml: Language not supported
- src/CommunityToolkit.Maui.DeviceTests/AppShell.xaml: Language not supported
- src/CommunityToolkit.Maui.DeviceTests/CommunityToolkit.Maui.DeviceTests.csproj: Language not supported
- src/CommunityToolkit.Maui.DeviceTests/MainPage.xaml: Language not supported
- src/CommunityToolkit.Maui.DeviceTests/NuGet.config: Language not supported
- src/CommunityToolkit.Maui.DeviceTests/Platforms/Android/AndroidManifest.xml: Language not supported
- src/CommunityToolkit.Maui.DeviceTests/Platforms/Android/Resources/values/colors.xml: Language not supported
- src/CommunityToolkit.Maui.DeviceTests/Platforms/MacCatalyst/Info.plist: Language not supported
- azure-pipelines.yml: Evaluated as low risk
- src/CommunityToolkit.Maui.DeviceTests/App.xaml.cs: Evaluated as low risk
- src/CommunityToolkit.Maui.DeviceTests/AppShell.xaml.cs: Evaluated as low risk
- src/CommunityToolkit.Maui.DeviceTests/Platforms/Tizen/Main.cs: Evaluated as low risk
- src/CommunityToolkit.Maui.DeviceTests/Platforms/Android/MainApplication.cs: Evaluated as low risk
- src/CommunityToolkit.Maui.DeviceTests/Platforms/Android/MainActivity.cs: Evaluated as low risk
Comments skipped due to low confidence (2)
src/CommunityToolkit.Maui.DeviceTests/BaseUITest.cs:25
- The TaskCompletionSource should specify the type explicitly, e.g., TaskCompletionSource<object?>.
var tcs = new TaskCompletionSource();
src/CommunityToolkit.Maui.DeviceTests/MainPage.xaml.cs:5
- [nitpick] The variable name 'count' is ambiguous. It should be renamed to 'clickCount' or something more descriptive.
int count = 0;
…pDelegate.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
I have been iterating on the repo and I have added some features for running on the cli without xharness. It uses tcp connections. Once I finish the final ios test runner, then I will ship a version and get it to work with skia as a first dogfooder. There are some great Android and Apple cli tools from @Redth, so I am using that under the hood. I also want to make is easier to have a test app and not need all the boilerplate with things like icons and resources. I am hoping to almost emulate a app project with nothing in it except your tests. This latter idea is maybe for next time I get to it, but hopefully the new cli tool can just replace the xharness way and I can deprecate/remove that dependency. I see this PR has been here for a while, what has been the main blockers to adding testing support to the toolkit? |
@mattleibow I was working on this one, and one thing that I can remember was, how to configure it to run on CI. Other than that I believe everything was working as expected |
|
Ah, nice. OK, so my repo now has workflows (iOS is almost done) and it is pretty simple - especailly with Jon's cool CLI tools to create, start, launch emus and sims. The workflows are a couple steps long, so you might just be able to copy and make it work. I really would like this all to be as simple as possible, so if anything is more that 3 chars deep and 2 lines long, let me know and I can try make it a single stop shop. |
|
How is this going? Do we still like this? So far, I have been using it in SkiaSharp and the last updates have made it very reliable. I still use xharness as a host, but the TCP runner is working and I am investigating a dotnet run-ability for things like mac and windows. The dream is still a dotnet test, but that may still be a net11 or later thing. There is hope. But if there is still interest in this I can have a look at all the updates and ensure the device tests can run. I have workflows that you can copy in the repo if need be. I think now all the nugets are on nuget.org, making things nicer. I also have a cli tool that does the work, but not required - you just have to capture the logs if you don't want it. I discovered that there is a wasdk nuget that does dotnet run now: https://www.nuget.org/packages/Microsoft.Windows.SDK.BuildTools.WinApp That is very cool and with dotnet run now working: mattleibow/DeviceRunners#94 |
That'd be great! To be honest, I never really got this working. |
This PR adds the Device test runner to our repo. It's WiP but it's nice to have some visibility of you all. It's working and if you want you can start to add tests. I added two tests to be a guide for you.
I'll need help of someone who knows yaml in order to create a step on our build to run these tests, I know that Maui does that so we can grab for them (?).
Right now these bits are in preview, and uses a private feed, I added a
nuget.configfile adding the source to the needed packages, I would say it's fine to use it since is the one that .NET MAUI uses and it the team is working in making this stable. Also, using it on our repo is a good way to help them provide early feedback.