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

ZqftcZqftc Member

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

Answers

  • TedRogersTedRogers USMember ✭✭✭✭

    @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.

    Ted

Sign In or Register to comment.