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

Rebuild the Xamarin.TestCloud nuget for .NET 6 #2416

Closed
JohnHDev opened this issue Apr 25, 2022 · 72 comments
Closed

Rebuild the Xamarin.TestCloud nuget for .NET 6 #2416

JohnHDev opened this issue Apr 25, 2022 · 72 comments
Labels
backlog Test Cloud backlog feature request New feature request plan item A piece of work planned for an iteration. testcloud-mobile Test cloud mobile

Comments

@JohnHDev
Copy link

Describe the solution you'd like
We need a new build of the Xamarin.TestCloud nuget for .NET 6. This is to allow .NET Maui projects to use UI tests on iOS.
.NET Maui is now in RC and is a supported product byMicrosoft, so dependencies like this need to be updated.

Describe alternatives you've considered
There isn't an alternative other than dropping Xamarin UITest and AppCenter altogether.

@JohnHDev JohnHDev added the feature request New feature request label Apr 25, 2022
@DmitriyKirakosyan DmitriyKirakosyan added test Related to the App Center Test service testcloud-mobile Test cloud mobile and removed test Related to the App Center Test service labels Apr 26, 2022
@AlexeyBudynkov
Copy link

@JohnHDev, hello. You mean Xamarin.TestCloud.Agent nuget package or Xamarin.UITest nuget package?

@JohnHDev
Copy link
Author

It is the testcloud agent nuget, the one that is required by iOS projects. At the moment we can't migrate to .NET Maui due to this.

@AlexeyBudynkov
Copy link

AlexeyBudynkov commented Apr 26, 2022

@JohnHDev Okay, thank you for your request. We created a task for that.

@JohnHDev
Copy link
Author

JohnHDev commented Apr 26, 2022

Excellent thank you!
Any idea when this might be available?

@AlexeyBudynkov
Copy link

Excellent thank you! Any idea when this might be available?

It's in our plans, but we don't have ETA for now.

@JohnHDev
Copy link
Author

Thanks Alexey.
If there is anything you can do to push this forward, that would be appreciated. Migrating to .NET Maui is a high priority and we need to get all our dependencies updated, including this one. We have extensive UI testing that will need to support .NET 6, and all we need to do that is this updated nuget. I would do it myself if it were open source.

@AlexeyBudynkov
Copy link

Thanks Alexey. If there is anything you can do to push this forward, that would be appreciated. Migrating to .NET Maui is a high priority and we need to get all our dependencies updated, including this one. We have extensive UI testing that will need to support .NET 6, and all we need to do that is this updated nuget. I would do it myself if it were open source.

We will reply to you when we'll finish the estimation

@kdharani
Copy link

Our organization has a plan to migrate to MAUI soon. I upvote this feature.

@IlyaBausovAkvelon
Copy link

This feature will be added in the new release soon.

@JohnHDev
Copy link
Author

@IlyaBausovAkvelon any news on this pls?

@Slm0nB
Copy link

Slm0nB commented Jun 9, 2022

We would love this feature :-)

@JohnHDev
Copy link
Author

Any update on this? .NET MAUI is now GA and we still can't run UI tests on iOS.
'Soon' obviously means different things to different people...

@dgerding
Copy link

dgerding commented Jul 8, 2022

Just weighing in with my strong, enthusiastic hope for this feature to arrive soon :-) thanks

@johnathan-s
Copy link

A client is deciding on a tech stack.
I cannot advise to the client to go with .net MAUI until there is a clear and clean automated test solution to testing .net MAUI.
Please put this at the top of the priority list.
Thanks

@MatkovIvan MatkovIvan added plan item A piece of work planned for an iteration. backlog Test Cloud backlog labels Jul 11, 2022
@dgerding
Copy link

Yes, please make this a top priority. We can't move to Maui without a replacement for automated ux testing.

@JohnHDev
Copy link
Author

@AlexeyBudynkov it is now 3 months since we asked for this and we still can't create UI tests for iOS.
Would you advise dropping Xamarin UITest and AppCenter all together? We need better support than this.

If this isn't going to happen can you ask for it to be made open source pls, without seeing the source I suspect we might be able to do this ourselves in a day or 3.

@akamenev
Copy link
Contributor

Hi @JohnHDev, thank you for your patience! Unfortunately, this feature takes more time to implement than we expected. It is currently in development and we will update everyone here once it is available.

@dgerding
Copy link

dgerding commented Aug 2, 2022

Hi @akamenev, we need some kind of eta, please. This year? Thanks

@dgerding
Copy link

Hi @akamenev, please provide an answer about Maui test support with some kind of real timeline or date estimations. thanks!

@mnxamdev
Copy link

mnxamdev commented Sep 7, 2022

Are we able to build .Net MAUI apps in App Center Build yet?

@AlexeyBudynkov
Copy link

@mnxamdev Hello. We're still working on it

@LarsNymand
Copy link

Upvote for .net maui support

@pm90pl
Copy link

pm90pl commented Feb 8, 2023

BrowserStack - but that cloud supports only Appium

@bvbellomo
Copy link

I don't know of any alternatives to AppCenter for iOS beside Apple's store, but would be interested if anyone had one.

@akrol95
Copy link

akrol95 commented Feb 20, 2023

Any update on this?

@vvechkanov
Copy link

vvechkanov commented Feb 23, 2023

@akrol95 We are still working on that task. Unfortunately no ETA yet. Thank you for your patience.

@miszu
Copy link

miszu commented Feb 28, 2023

+1 for that, we invested quite a lot of time in these UI Tests and now simply can't run them. Happy to beta test a package early :)

@evgenyvalavin
Copy link

any news?

@MartinZikmund
Copy link

This is very important one

@weitzhandler
Copy link

This one is a blocker

@krzbbaranowski
Copy link

My team is considering replacing TestCloud with local machines. I wonder how many teams will do the same.
We are almost done with the migration to .NET 7 so we can't wait for the new version of TestCloud indefinitely...

My biggest concern is the fact that MS team has no ETA.

@JohnHDev
Copy link
Author

JohnHDev commented Apr 4, 2023

@krzbbaranowski what will you replace the test framework with? Ideally looking for a replacement for Xamarin.UITest in its entirety, but still be able to create UI tests with C#.

@johnathan-s
Copy link

johnathan-s commented Apr 5, 2023 via email

@joshardt
Copy link

joshardt commented Apr 5, 2023

To any who have ended up on this thread that have an alternative, please post them here. Thanks

Appium with BrowserStack in C# with NUnit. No backdoors though.

@e1T
Copy link

e1T commented Apr 5, 2023

Our team has started the transition to Appium with C# and xUnit. We've added up an interface to abstract platform-specific drivers so we can use a single code base for the UI tests. Benefit of Appium is that it works with Xamarin Forms app and our future MAUI version as well.
We're also planning on implementing parallel testing on multiple devices locally.

@JohnHDev
Copy link
Author

JohnHDev commented Apr 5, 2023

@e1T How does Appium deal with automation on iOS? Xamarin UITest requires the iOS app is built with the Xamarin.TestCloud nuget installed with an initialiser for the library, is there not the same requirement with Appium?

Looks like we will most likely go the same route as you.

@e1T
Copy link

e1T commented Apr 5, 2023

The iOS (or Android) app project doesn't need to include references to Appium itself. With Appium you can automate any application. For iOS it uses a Web Driver Agent installed on the device which runs the commands sent from the Appium server.
The architecture looks like this:
image

@anxkha
Copy link

anxkha commented Apr 12, 2023

I was able to successfully get my application to have a basic test run against it today with Xamarin.UITest 4.1.3 in an NUnit 3 project targeting .NET 7. I'm not sure where the disconnect is between the MS dev team working on this and their inability to post a meaningful update in this issue, but I suspect this has been fixed on .NET 6/7 for a little while now. I don't have any super complicated test cases to try out with this at this time, but I'm curious if others can try Xamarin.UITest 4.1.3 and let me/us all know if your more advanced tests just work!

@JohnHDev
Copy link
Author

@anxkha I presume you are referring to a UI test with an Android app, the issue here is that to run a UI test on iOS we need to install the TestCloud nuget, which we can't yet without it being rebuilt. Let us know though! :)

@anxkha
Copy link

anxkha commented Apr 12, 2023

@JohnHDev Ah yes, that's a fair point my bad on not fully understanding some of the concerns here (there's confusion earlier on in the thread about which package specifically). Our app is pretty specialized and only on Android so I was only concerned about that. That's disappointing that TestCloud hasn't been updated yet :(

@JohnHDev
Copy link
Author

@vvechkanov any news? we are about to invest resources into moving from Xamarin UITest to Appium. We need to do this to be able to move to .NET Maui before Xamarin is deprecated.

If it is no longer supported just say so. At the moment Microsoft is just wasting our time.

@amrara
Copy link

amrara commented Apr 16, 2023

Any news?
Running Android or iOS build on .NET 6, with XamarinUITest 4.1.3 on App Center still not possible for me.
WARNING: Testing tests built for .NET 6 and above is not yet supported on Test Cloud.
Any workaround please?

@IlyaBausovAkvelon
Copy link

Hi All!
Thanks for your patience. The new TestCloudAgent with .NET 6 and above support will be released tomorrow.

@JohnHDev
Copy link
Author

@IlyaBausovAkvelon thank you for the update.
I have just tried the new Xamarin.TestCloud nuget on a .NET Maui project and I am now able to successfully write UI tests that include iOS.
Please congratulate the team on a job well done. It is unfortunate it has taken a year (- 6 days) to complete.

@JohnHDev
Copy link
Author

@IlyaBausovAkvelon I have spotted an issue with the nuget, release builds appear to be including the nuget and they fail on uploading to TestFlight. The Calabash.Start() code is wrapped in a ifdef for DEBUG, but I have worked around the issue with the following in the .csproj:

<ItemGroup Condition="'$(TargetFramework)' == 'net7.0-ios' AND $(Configuration) == 'Debug'"> <PackageReference Include="Xamarin.TestCloud.Agent" Version="0.23.2" /> </ItemGroup>

the error in the upload is:
[08:13:08]: [altool] detail = "The app references non-public selectors in Payload/AppDev.xxx.app/AppDev.xxx: setOrientation:animated:";

@evgenyvalavin
Copy link

evgenyvalavin commented May 2, 2023

Same issue with non-public API Usage from App Store Connect:

ITMS-90338: Non-public API usage - The app references non-public selectors in [ProjectName]: setOrientation:animated:. If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above APIs may be located in a static library that was included with your app. If so, they must be removed. For further information, visit the Technical Support Information at http://developer.apple.com/support/technical/

ITMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability. Learn more (https://developer.apple.com/documentation/uikit/uiwebview).

@JohnHDev
Copy link
Author

JohnHDev commented May 3, 2023

@IlyaBausovAkvelon any comments on this? ideally need a fix, having to put conditions in the csproj isn't really ideal.

@IlyaBausovAkvelon
Copy link

@JohnHDev could you please clarify do you need Release configuration to test app on TestFlight?
Does TestFlight accept Debug builds?

Answering your question: This is by design. We don't think that calabash and TestCloud.Agent package should be in release configurations. I think in your case it's better to customize the project file.

@DmitriyKirakosyan

@JohnHDev
Copy link
Author

JohnHDev commented May 4, 2023

@IlyaBausovAkvelon The builds we are uploading to TestFlight are release builds.

The Xamarin.Calabash.Start(); code is wrapped in an IFDEF DEBUG && IOS, so isn't being called on a release build.

However, something in the nuget means it is being included in the Release build when it should be linked out if there aren't any references.

@evgenyvalavin
Copy link

What if it's actually a dotnet trimmer's (Linker) issue? Looks like it's the trimmer's responsibility to not include assemblies wrapped in DEBUG or AD-HOC etc.
.NET 7 Linker has lots of issues which were not released yet: dotnet/linker#3160

@JohnHDev
Copy link
Author

JohnHDev commented May 8, 2023

What if it's actually a dotnet trimmer's (Linker) issue? Looks like it's the trimmer's responsibility to not include assemblies wrapped in DEBUG or AD-HOC etc.
.NET 7 Linker has lots of issues which were not released yet: dotnet/linker#3160

I believe you are correct, I have updated Xamarin iOS projects to the latest Xamarin.TestCloud nuget and Im not seeing the same issue with Release builds.

Im going to close this issue as the TestCloud nuget has now been updated to support .NET 6.

@JohnHDev JohnHDev closed this as completed May 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Test Cloud backlog feature request New feature request plan item A piece of work planned for an iteration. testcloud-mobile Test cloud mobile
Projects
None yet
Development

No branches or pull requests