xunit / devices.xunit

xUnit.net Runners for Devices
Other
73 stars 36 forks source link

TestMethods not found after adding xunit.runner.devices nuget package #60

Closed byrialsen closed 6 years ago

byrialsen commented 7 years ago

Hi.

I have a solution with an UWP application where I need to add some unit so I have decided to tryout xunit and run it on devices like described here: https://xunit.github.io/docs/getting-started-devices-uwp.html.

In respect to running the xunit test on a device everything works fine, but at the moment I add a reference to the xunit.runner.devices nuget package Visual Studio are not able to find/detect test methods anymore.

Output windows shows:

[13-11-2017 10:31:23 Informational] ------ Discover test started ------
[13-11-2017 10:31:23 Warning] [xUnit.net 00:00:00.0838783] Skipping: UwpTestRunner (Could not find/load any of the following assemblies: xunit.execution.desktop.dll)
[13-11-2017 10:31:23 Informational] ========== Discover test finished: 0 found (0:00:00,1760319) ==========
[13-11-2017 10:33:21 Informational] ------ Discover test started ------
[13-11-2017 10:33:22 Warning] [xUnit.net 00:00:00.0835425] Skipping: UwpTestRunner (Could not find/load any of the following assemblies: xunit.execution.desktop.dll)
[13-11-2017 10:33:22 Informational] ========== Discover test finished: 0 found (0:00:00,1620295) ==========
[13-11-2017 10:34:41 Informational] ------ Discover test started ------
[13-11-2017 10:34:41 Warning] [xUnit.net 00:00:00.0745213] Skipping: UwpTestRunner (Could not find/load any of the following assemblies: xunit.execution.desktop.dll)
[13-11-2017 10:34:41 Informational] ========== Discover test finished: 0 found (0:00:00,1550351) ==========

I can see that other people have seen similar problems also but they seems to be related to older earlier versions of xunit/xunit devices which should have been fixed by now.

Any suggestions to what is wrong in my case:

[Details]
UWP target (min = max = Anniversary Update)
Xunit (2.3.1)
Xunit devices (2.3.0)
andoniripoll1 commented 6 years ago

Exact samething happening to me

bradwilson commented 6 years ago

The Device runner is for running tests on the device itself (or inside an emulator); it's not for running the tests in Visual Studio. For that, you should use xunit.runner.visualstudio instead.

clairernovotny commented 6 years ago

I am working on ensuring they work together in an upcoming release, but it relies on TPv2 and improvements there.