Xamarin Test Cloud allows to run coded UI tests on a wide range of physical tests devices. Your tests and your app are published to the Xamarin Test Cloud where the tests will be executed.

Setup your coded UI tests

Xamarin supports two different UI test frameworks, Xamarin.UITest and Calabash. Users who wrote their app with Xamarin should use Xamarin.UITest. Simply add a new project to your solution. Choose the appropriate template depending which platforms you want to write tests for.


After that you have to add the references to your projects you want to test. If you want to test a IOS Project you have to add the Xamarin Test Cloud Agent via Nuget to the iOS Project and initialize the agent. Add the following lines of code to the FinishedLaunching method of your Appdelegate class.  Android doesn’t need such thing.


// Newer version of Xamarin Studio and Visual Studio provide the
// ENABLE_TEST_CLOUD compiler directive in the Debug configuration,
// but not the Release configuration.

Setup Xamarin Test Cloud

After you initially created the test project from the template you should have a single test method in your test project. To run this project in the test cloud you must have an Xamarin Test Cloud account. Under your account settings you can optionally create teams and assign users to them. The easiest way to publish your app to the Test Cloud is with Visual Studio. Publishing an Android and IOS is different.

For Android, you make sure you Android project is set as startup project, the current .apk in the bin/debug folder and the build configuration set to Release.


For IOS, make also sure that your project is set as startup project. Check that the build configuration is set to debug.


Right click on the UI Test Projekt and click Run in Test Cloud. In the console you should see the progress of uploading the test project and your package. After everything is completed you should receive the following message


On the Test Cloud website you can select the team, the devices and the device language for your tests. All of this can also be executed from the command line, without any user interaction required, so it is possible to integrate this in your build process. See Submitting UITests at the Command Line for more information.

On the Xamarin Test Cloud Website you can see the submitted apps, the test runs you started and the results of the tests, including the screen shots which are taken on each test device.




Leave a Reply

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>