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

  • Question

  • User387791 posted

    Hi all,

    I hope you can help.

    I'm following a tutorial on Udemy but it's not quite up-to-date, so I'm having to deviate a little due to software changes since the tutorial was made.

    In the tutorial, the tutor selects a project template which includes an example app's code. This allows the tutor to select emulators to test against.

    However, I do not have access to that template, it seems that the equivalent project template in my VS2017 is 'Xamarin.UITest Cross-Platform Test Project'.

    This template doesn't include an example app's code. This, in turn, means I have no emulator drop-down(s).

    So the simple answer would be - include the app's code in my solution. But I can't. I'll be automating an app developed by a 3rd party - we'll receive the apk's and ipa's after every sprint.

    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/code to my solution?

    Thank you

    Friday, August 2, 2019 9:16 AM

All replies

  • User35208 posted

    @Zqftc If you get the Android emulator running it should find it as I remember. I haven't run tests in a few months so it is a bit foggy.

    We do this to run the app based on the path to the APK.

    ConfigureApp.Android.ApkFile(apkFilePath).WaitTimes(new WaitTimes()).StartApp();

    Hope this helps.


    Friday, August 9, 2019 2:20 PM