Bug 59176 - Cannot run UITests from Visual Studio 2017
Summary: Cannot run UITests from Visual Studio 2017
Status: CONFIRMED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: Test Cloud ()
Version: 4.7.0 (15.4)
Hardware: PC Windows
: --- normal
Target Milestone: Future Cycle
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-09-01 14:12 UTC by Bartłomiej Pater
Modified: 2017-09-20 18:35 UTC (History)
4 users (show)

Tags: ac
Is this bug a regression?: ---
Last known good build:


Attachments
sample application (1.44 MB, application/zip)
2017-09-04 12:37 UTC, Bartłomiej Pater
Details
VS2017 logs (55.89 KB, application/zip)
2017-09-04 12:52 UTC, Bartłomiej Pater
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 59176 on Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.
Related Links:
Status:
CONFIRMED

Description Bartłomiej Pater 2017-09-01 14:12:37 UTC
It always fail with exception about missing apk file: 

> ApkFile or InstalledApp has not been configured.

and works perfectly in VS2015 with the same Xamarin version.

It is run with default code:

>            if (platform == Platform.Android)
>            {
>                return ConfigureApp
>                    .Android
>                    .StartApp();
>            }
>
>            return ConfigureApp
>                .iOS
>                .StartApp();

Any idea how to solve this? I'd like to switch to VS2017 completely.
Comment 1 Prashant [MSFT] 2017-09-04 04:52:28 UTC
Thanks so much for taking the time to submit this report! 

Have you referenced the Android app in your test app?

I attempted to reproduce this issue based on the bug description with the latest Visual Studio 2017 15.4, and I was unable to hit the problem. If this issue is still occurring for you, please reopen this report and attach a reproduction, ideally starting with a new template project and then adding just the code necessary to demonstrate the issue. 

Please attach the following to help us reproduce this issue: 
-Detailed reproduction steps 
-Version information (Help → About Microsoft Visual Studio → Copy Info) 
-Logs (Help → Xamarin → Zip Logs (last 7 days)) 
-project to reproduce your issue
Comment 2 Bartłomiej Pater 2017-09-04 12:37:53 UTC
Created attachment 24548 [details]
sample application
Comment 3 Bartłomiej Pater 2017-09-04 12:51:44 UTC
Yes, the app is referenced in UITests, and it works perfectly fine in Visual Studio for Mac or VS2015. Only VS2017 claims missing apk, etc. I work with release version 15.3 which I've set in bug but I have also installed 15.4-preview. Still no success.

I'm attaching all required files. Reproductions steps are fairly simple:

1. Open attached solution (App1)
2. Rebuild solution
3. From Tests Explorer try to run UITest (there's only one) for Android
4. VS2017 fails with missing APK error.
Comment 4 Bartłomiej Pater 2017-09-04 12:52:08 UTC
Created attachment 24549 [details]
VS2017 logs
Comment 5 Bartłomiej Pater 2017-09-04 12:53:28 UTC
VS2017 15.3 version string:

----------------

Microsoft Visual Studio Professional 2017 
Version 15.3.3
VisualStudio.15.Release/15.3.3+26730.12
Microsoft .NET Framework
Version 4.7.02053

Installed Version: Professional

Visual Basic 2017   00369-60000-00001-AA783
Microsoft Visual Basic 2017

Visual C# 2017   00369-60000-00001-AA783
Microsoft Visual C# 2017

Common Azure Tools   1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Merq   1.1.17-rc (cba4571)
Command Bus, Event Stream and Async Manager for Visual Studio extensions.

Mono Debugging for Visual Studio   4.6.8-pre (ec7034f)
Support for debugging Mono processes with Visual Studio.

NuGet Package Manager   4.3.1
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

Visual Studio Code Debug Adapter Host Package   1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Xamarin   4.6.0.299 (b63523e27)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android SDK   7.4.0.21 (2851083)
Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS and Xamarin.Mac SDK   10.12.0.20 (80b8487)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

----------------
Comment 6 Bartłomiej Pater 2017-09-04 12:54:06 UTC
VS2017 15.4-preview version string:

-----------------
Microsoft Visual Studio Professional 2017 Preview (2)
Wersja 15.4.0 Preview 1.0
VisualStudio.15.Preview/15.4.0-pre.1.0+26823.1
Microsoft .NET Framework
Wersja 4.7.02053

Zainstalowana wersja: Professional

Visual Basic 2017   00369-60000-00001-AA783
Microsoft Visual Basic 2017

Visual C# 2017   00369-60000-00001-AA783
Microsoft Visual C# 2017

Common Azure Tools   1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Menedżer pakietów NuGet   4.4.0
Menedżer pakietów NuGet w programie Visual Studio. Więcej informacji na temat narzędzia NuGet można znaleźć na stronie http://docs.nuget.org/.

Merq   1.1.17-rc (cba4571)
Command Bus, Event Stream and Async Manager for Visual Studio extensions.

Mono Debugging for Visual Studio   4.7.4-pre (c2d89eb)
Support for debugging Mono processes with Visual Studio.

Visual Studio Code Debug Adapter Host Package   1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

VisualStudio.IoT   1.0
Package with IoT components for Visual Studio

VisualStudio.Mac   1.0
Mac Extension for Visual Studio

Xamarin   4.7.0.827 (ddd8750)
Rozszerzenie programu Visual Studio umożliwiające programowanie aplikacji Xamarin.iOS i Xamarin.Android.

Xamarin.Android SDK   7.5.0.3 (3e66e8e)
Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS and Xamarin.Mac SDK   10.14.0.4 (c70e3b5)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
----------------
Comment 7 Prashant [MSFT] 2017-09-05 07:10:14 UTC
Thanks so much for taking the time to submit this report! 

I can confirm using the latest Visual Studio 2017 v15.4
I am able to reproduce this issue. Marking this report as CONFIRMED.

Note that we don't see this issue if we just create an Android App and add UITests to the solution. Please use the attached sample for reproduction