Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UWP/WASDK Tests won't run upgrading to 3.1.1 #1726

Closed
michael-hawker opened this issue Jul 27, 2023 · 6 comments
Closed

UWP/WASDK Tests won't run upgrading to 3.1.1 #1726

michael-hawker opened this issue Jul 27, 2023 · 6 comments

Comments

@michael-hawker
Copy link

Describe the bug

Was trying to update from 2.2.10 to 3.1.1 for MSTest.TestAdapter/Framework as we're not seeing Logger.LogMessage/TextContext.WriteLine output appear in Visual Studio (no Output/Additional Output link appears next to test), not sure what's going on there, but figured updating may help.

However, after cleaning our environment and reopening Visual Studio, only some tests are discovered and I saw this in the test log:

Could not determine target device configuration. Exception: System.Runtime.InteropServices.COMException (0x80020009): The method or operation is not implemented.
   at EnvDTE.Property.get_Value()
   at Microsoft.VisualStudio.TestWindow.ShellServices.ProjectDataImpl.<GetRemoteMachineAddressAsync>d__36.MoveNext()
========== Starting test discovery ==========
========== Test discovery finished: 44 Tests found in 4.8 sec ==========
Could not determine target device configuration. Exception: System.Runtime.InteropServices.COMException (0x80020009): The method or operation is not implemented.
   at EnvDTE.Property.get_Value()
   at Microsoft.VisualStudio.TestWindow.ShellServices.ProjectDataImpl.<GetRemoteMachineAddressAsync>d__36.MoveNext()
Could not determine target device configuration. Exception: System.Runtime.InteropServices.COMException (0x80020009): The method or operation is not implemented.
   at EnvDTE.Property.get_Value()
   at Microsoft.VisualStudio.TestWindow.ShellServices.ProjectDataImpl.<GetRemoteMachineAddressAsync>d__36.MoveNext()
Building Test Projects
Aborting test run due to build failures. Please see the build output for more details.
Building Test Projects
Starting test discovery for requested test run
========== Starting test discovery ==========
An exception occurred while test discoverer 'MSTestDiscoverer' was loading tests. Exception: Method not found: 'Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.MSTestAdapterSettings Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.MSTestSettingsProvider.get_Settings()'.
No test is available in entrypoint\CommunityToolkit.Tests.Uwp.exe. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
========== Test discovery finished: 0 Tests found in 21.5 sec ==========
========== Starting test run ==========
========== Test run finished: 0 Tests (0 Passed, 0 Failed, 0 Skipped) run in < 1 ms ==========

Using VS 2022 17.6.5.
WASDK 1.3.230331000 and UWP
TFMS: net6.0-windows10.0.19041.0/uap10.0.17763

Steps To Reproduce

  1. Fully clone: https://github.com/CommunityToolkit/Labs-Windows (it has a submodule)
  2. Update following files in the tooling directory to latest version of MSTest:
    image
  3. Try and run tests.

Expected behavior

All tests discovered and tests run

Actual behavior

Tests don't run/Not all discovered

image

You can see none of our source generated tests are even listed after a build (works ok on 2.2.10 after initial build):

image

Additional context

@AnalogFeelings
Copy link

Same here.

@Evangelink
Copy link
Member

Hi @michael-hawker,

For the various

Could not determine target device configuration. Exception: System.Runtime.InteropServices.COMException (0x80020009): The method or operation is not implemented.
   at EnvDTE.Property.get_Value()
   at Microsoft.VisualStudio.TestWindow.ShellServices.ProjectDataImpl.<GetRemoteMachineAddressAsync>d__36.MoveNext()

showing in the output, please open an issue on developer community this is linked to some bug in Test Explorer and it's not handled by us.

For the other part of the problem. you haven't given me much information as to what is missing... I have done a build, open the sln on VS and I see 6 tests under ExampleCanbasLayoutTestClass which seems to be 3 more than you. I can also run them correctly.
image

@microsoft-github-policy-service
Copy link
Contributor

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 10 days of this comment.

@ErikApption
Copy link

I'm seeing same issue here on a non UWP project

@sonnemaf
Copy link

I also have this problem. I hope it will get fixed.

The Test output windows shows that there is an exception in the Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.MSTestSettingsProvider.get_Settings().

========== Starting test run ==========
========== Test run finished: 0 Tests (0 Passed, 0 Failed, 0 Skipped) run in < 1 ms ==========
========== Starting test run ==========
========== Test run finished: 0 Tests (0 Passed, 0 Failed, 0 Skipped) run in < 1 ms ==========
Starting test discovery for requested test run
========== Starting test discovery ==========
An exception occurred while test discoverer 'MSTestDiscoverer' was loading tests. Exception: Method not found: 'Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.MSTestAdapterSettings Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.MSTestSettingsProvider.get_Settings()'.
No test is available in entrypoint\UnitTestProject1.exe. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
========== Test discovery finished: 0 Tests found in 820 ms ==========
========== Starting test run ==========
========== Test run finished: 0 Tests (0 Passed, 0 Failed, 0 Skipped) run in < 1 ms ==========
Starting test discovery for requested test run
========== Starting test discovery ==========
========== Test discovery finished: 1 Tests found in 2.6 sec ==========
========== Starting test run ==========
========== Test run finished: 1 Tests (1 Passed, 0 Failed, 0 Skipped) run in 125 ms ==========
Starting test discovery for requested test run
========== Starting test discovery ==========
An exception occurred while test discoverer 'MSTestDiscoverer' was loading tests. Exception: Method not found: 'Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.MSTestAdapterSettings Microsoft.VisualStudio.TestPlatform.MSTestAdapter.PlatformServices.MSTestSettingsProvider.get_Settings()'.
No test is available in entrypoint\UnitTestProject1.exe. Make sure that test discoverer & executors are registered and platform & framework version settings are appropriate and try again.
========== Test discovery finished: 0 Tests found in 2.3 sec ==========
========== Starting test run ==========
========== Test run finished: 0 Tests (0 Passed, 0 Failed, 0 Skipped) run in < 1 ms ==========

@juanmalm
Copy link

Same here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants