visual-studioxamarintestinghybrid-mobile-appxamarin-test-cloud

What is Xamarin Test Cloud for?


I am working on developing a Xamarin hybrid (html+js+css) application for Android using Visual Studio for iOS.

My client wants to upload builds (of the app) to the Xamarin Test Cloud. I am new to Xamarin, so I have no idea about Xamarin Test Cloud. I have done some research and found that we can write test cases in our application and send them to Xamarin Test Cloud.

So far I understand it, Xamarin Test Cloud is only for app testing purposes, not for sharing buildAs with multiple users or clients. Am I right or not?

Please let me know more about Xamarin Test Cloud, i.e what are the uses of it.


Solution

  • In short Xamarin.Test.Cloud is a cloud service for automated UI tests.Those UI tests can be written in Calabash and/or C# NUnit project in form of unit tests. Most of the developers use C# version form od the framework. This Xamarin product is called Xamarin.UITest which is created locally with Xamarin tools and uploaded to Xamarin.Test.Cloud.

    More in depth...

    Xamarin.UITest which most of developers use is basically NUnit C# project in Viusal Studio or Xamarin.Studio. It loads user's apk (Andriod) or ipa/app (iOS) file and prepares everything for testing. Testing might include:

    1. exploring UI (detecting content, widgets/views/controls names and content)
    2. interacting with UI (tapping, scrolling)
    3. recording interactions from 2. so they can be used in automated tests

    https://developer.xamarin.com/guides/testcloud/uitest/

    API is not complex, but needs some [short] time for learning. Maybe more for tricks like working with pickers (especially in Xamarin.Forms), backdoors, gestures etc. My daughter is 15 and she's doing talks on Xamarin.UITest, because it is that simple and nice for kids to learn coding and feel "productive".

    Sample interaction:

    app.Tap( c => c.Marked("Login") );
    

    Another useful command is: tree - to see Visual Tree (DOM) of the Ui presented.

    NOTE:

    Xamarin.UITest is not limited to apps written in Xamarin! It can be used with Android app written in Java, iOS app written in objective-c/swift!

    Xamarin.UITest differs for hybrid apps, because the DOM is actually HTML DOM. Hence - try exploring DOM with tree command.

    With Xamarin.UITest and nunit runner you can test locally on your devices and/or emulators/simulators. 15 minutes limit is removed if I can recall correctly.

    Xamarin.Test.Recorder is useful tool for exploring and recording Xamarin.UITests. On Mac this should be standalone app and on Windows you'll need Visual Studio Enterprise (restriction).

    https://developer.xamarin.com/guides/testcloud/testrecorder/

    Xamarin.Inspector from package called Xamarin.Interactive is another standalone tool for analysing and inspecting UI of the app.

    https://developer.xamarin.com/guides/cross-platform/inspector/

    When UI test is written - the project output (dlls) are uploaded to the Xamarin.Test.Cloud. To get project output you'll need Xamarin.Studio or Visual Studio with Xamarin tools installed.

    Before upload there are several steps user needs to do like: selecting devices (number depends on pricing), getting APIKey for particular tests. Uploading is done through commandline...

    https://developer.xamarin.com/guides/testcloud/uitest/working-with/submitting-tests-to-xamarin-test-cloud/

    Then user goes to XTC (Xamarin.Test.Cloud) portal and checks results (reports, screenshots etc).

    This is how it looks like behind the scenes (this is what I like to show during my talks):

    https://youtu.be/PQMBCoVIABI?t=3432

    Handsome Danish guys (which cannot play handball) on stage and 2000+ devices on the shelves (it was 1900+ devices in 2015-09) in the datacenter...

    For sharing - use HockeyApp

    For monitoring - use Xamarin.Insights

    NOTE: HockeyApp and Xamarin.Insight are being merged to single product for beta-testing and monitoring (TestFlight like).