How do I test apps on emulators in Visual Studio without including the app's project in the solution?

0

I am creating a Xamarin.UITest automation project using the template 'Xamarin.UITest Cross-Platform Test Project'.

I will be automating an app developed by a 3rd party so I don't have the option of adding the project to my solution - but this seems to be a prerequisite for gaining access to these dropdowns:

drop-downs]

I will be testing against the .apk file they produce every sprint, the path of which I've added in AppInitializer.cs

I am currently unable to target an emulator/device to run my tests on. When I run my tests, I get the error

Message: SetUp : System.Exception : No devices connected.

How do I run my tests on an emulator without adding the app's project to my solution?

Zuno

Posted 2019-07-30T09:31:33.400

Reputation: 101

Answers

0

I needed to go into Android Device Manager and 'Start' one of the emulated devices. Then run the test.

Or, do the above, then if I have multiple devices connected, in AppInitializer.cs, specify the device I want to use by its serial number:

    if (platform == Platform.Android)
    {
        return ConfigureApp.Android.ApkFile(@"C:\App Automation Files\com.companyname.UITestDemo.apk").DeviceSerial("emulator-5554").StartApp();
    }

Zuno

Posted 2019-07-30T09:31:33.400

Reputation: 101