How to run Xamarin UI tests on an Android emulator

How to run Xamarin UI tests on an Android emulator? I always run my test on real devices, but for CI I need tests on the emulator, but I don’t know how Google did not give me a specific answer.

public class AppInitializer
{
    private const string ApkPath = @"..\..\..\mob\mob.Droid\bin\Release\myApp.apk";
    private const string AppPath = "mob.iOS.app";

    public static IApp StartApp(Platform platform)
    {
        if (platform == Platform.Android)
        {
            return ConfigureApp
                .Android
                .EnableLocalScreenshots()
                .ApkFile(ApkPath)
                .StartApp();
        }

        return ConfigureApp
            .iOS
            .EnableLocalScreenshots()
            .StartApp();
    }
}
+4
source share
1 answer

The documentation and how @tequilaslammer summarizes:

iOS, Xamarin.UITest Android-. , Android Android. , /, .

: https://developer.xamarin.com/guides/testcloud/uitest/intro-to-uitest/#Initializing_AndroidApp

, "gotchas", :

https://developer.xamarin.com/guides/testcloud/uitest/intro-to-uitest/

+4

Source: https://habr.com/ru/post/1666526/


All Articles