Skip to content

MSTest 3.6.2, the sample for WinUI MSTestRunnerWinUI does not work anymore in Visual Studio Test Explorer #4064

@abdes

Description

@abdes

Describe the bug

MSTest 3.6.2, the sample for WinUI MSTestRunnerWinUI does not work. None of the configuration works, Packaged or not.

Visual Studio TestExplorer spins discovering tests, then aborts after a while:

DeployAsync: END (Success, 0:00:00.052)
DeployAsync: END (Success, 0:00:00.052)
DeployAsync: END (Success, 0:00:00.052)
DeployAsync: END (Success, 0:00:00.052)
Deployment operation succeeded, package moniker: 'b5658c5f-445d-4074-abca-01ab7ed06549_1.0.0.0_x64__40kwtmqeqdjcp'.
Attempting to launch app with app user model Id 'b5658c5f-445d-4074-abca-01ab7ed06549_40kwtmqeqdjcp!App' and arguments '--port 54493 --endpoint 127.0.0.1:054493 --role client --parentprocessid 47884 --local-path "F:\projects\testfx\samples\public\mstest-runner\MSTestRunnerWinUI\UnitTest\bin\x64\Debug\net6.0-windows10.0.19041.0\win10-x64" --telemetryoptedin true'.
Deploy: END (Success, 0:00:00.052)
Deploy: END (Success, 0:00:00.052)
Deploy: END (Success, 0:00:00.052)
Deploy: END (Success, 0:00:00.052)
Successfully launched process Id '48124'.
Microsoft.VisualStudio.TestPlatform.ObjectModel.TestPlatformException: vstest.console process failed to connect to testhost process after 90 seconds. This may occur due to machine slowness, please set environment variable VSTEST_CONNECTION_TIMEOUT to increase timeout.
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.ThrowExceptionOnConnectionFailure(IEnumerable`1 sources, Int32 connTimeout) in /_/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyOperationManager.cs:line 548
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.SetupChannel(IEnumerable`1 sources, String runSettings) in /_/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyOperationManager.cs:line 300
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyDiscoveryManager.InitializeDiscovery(DiscoveryCriteria discoveryCriteria, ITestDiscoveryEventsHandler2 eventHandler, Boolean skipDefaultAdapters) in /_/src/Microsoft.TestPlatform.CrossPlatEngine/Client/ProxyDiscoveryManager.cs:line 149
Terminating app with process ID '48124'.
========== Test discovery aborted: 0 Tests found in 1.5 min ==========

Using exactly the sample as-is with no modification.

Steps To Reproduce

  1. Clone the repo
  2. open the MSTestRunnerWinUI solution file
  3. Build
  4. Run tests with Test Expplorer
  5. Fail!

Expected behavior

This worked at some point in time with 3.4x and then for mysterious reasons, it doesn't anymore. A lot of time wasted trying to figure out what combination of properties would make it work with no success.

Actual behavior

A miserable and disappointing total failure 🤕

Additional context

Microsoft Visual Studio Community 2022
Version 17.11.6
VisualStudio.17.Release/17.11.6+35431.28
Microsoft .NET Framework
Version 4.8.09032

Image

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions