aspnet / Tooling

Issue tracker and info on Visual Studio tooling for ASP.NET
Other
256 stars 124 forks source link

Error discovering tests #183

Open Eilon opened 9 years ago

Eilon commented 9 years ago

From @JamesNK on August 2, 2015 5:42

Error in VS2015 Output window. Using beta 6.

No tests are shown in Test Explorer window.

------ Discover test started ------
------ Test started: Project: Newtonsoft.Json.Tests ------
Starting  Microsoft.Framework.TestHost [C:\Users\James\.dnx\runtimes\dnx-coreclr-win-x86.1.0.0-beta6\bin\dnx.exe --appbase "C:\Development\Source\Json\Newtonsoft.Json\Src\Newtonsoft.Json.Tests" Microsoft.Framework.ApplicationHost --port 50440 Microsoft.Framework.TestHost --port 50629]
Connected to Microsoft.Framework.TestHost
Discovering tests in 'C:\Development\Source\Json\Newtonsoft.Json\Src\Newtonsoft.Json.Tests\project.json'
Error discovering tests in 'C:\Development\Source\Json\Newtonsoft.Json\Src\Newtonsoft.Json.Tests\project.json'\r\nSystem.Exception: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
   at Microsoft.VisualStudio.Web.UnitTest.TestAdapter.Discovery.HostExtensions.GetTests(IHost host, ITestCaseDiscoverySink discovery, IMessageLogger logger, KRuntimeConfiguration testConfiguration)
   at Microsoft.VisualStudio.Web.UnitTest.TestAdapter.KUnitTestDiscoverer.GetTestCases(IEnumerable`1 sources, IMessageLogger logger, ITestCaseDiscoverySink discoverySink)
========== Discover test finished: 0 found (0:00:16.2319284) ==========

Copied from original issue: aspnet/Testing#134

Eilon commented 9 years ago

@rynowak @vijayrkn I think you two guys might know something about this?

Eilon commented 9 years ago

From @JamesNK on August 2, 2015 6:42

I tracked this down to a bug I added to Json.NET while making changes. The test host uses Json.NET so my bug took down the host when it encountered the bug.

So no bug in the host but I think you should add more error handling so it doesn't crash so badly and pass the error message back to VS. That will help the user a better idea of what has gone wrong.

Eilon commented 9 years ago

From @dougbu on August 2, 2015 19:33

@JamesNK do any released versions of Json.NET contain the bug? For example are "Newtonsoft.Json": "6.0.6" through ... "6.0.8" fine while ... "7.0.1" has this problem and ... "7.0.2" will be fine again?

Eilon commented 9 years ago

From @JamesNK on August 2, 2015 20:52

No, it was from wip dev changes. Testing Json.NET is slightly difficult if the change I make during dev breaks the test application :smile:

Eilon commented 9 years ago

From @rynowak on August 3, 2015 15:49

@JamesNK - do you happen to know offhand what the callstack was that throwing?

@vijayrkn My guess is that we'll want to do something dumber to serialize error messages.

Eilon commented 9 years ago

@rynowak we do have our super simple JavaScript serializer/deserializer... or actually I don't know if we have a serializer; we may have only put in a deserializer...

Eilon commented 9 years ago

From @rynowak on August 3, 2015 16:26

yeah, that would be good as well, we should remove json.net as a dependency as possible so you can use whatever version you want

Eilon commented 9 years ago

If we want to do this I'd have to go dig up my old source codez to find the missing features.

Eilon commented 9 years ago

From @vijayrkn on August 3, 2015 17:4

Created a bug in tooling repo (https://github.com/aspnet/Tooling/issues/129) to track 'removing the json.net dependency' from VS unit test adapter.

Eilon commented 9 years ago

From @JamesNK on August 3, 2015 23:21

@JamesNK - do you happen to know offhand what the callstack was that throwing?

That's all the error message says. You should include more detail to VS when an error is thrown: https://github.com/aspnet/Testing/blob/979ada31b945e4597abf84a82fec3612825b4632/src/Microsoft.Dnx.TestHost/ReportingChannel.cs#L87

Eilon commented 9 years ago

From @JamesNK on August 3, 2015 23:26

yeah, that would be good as well, we should remove json.net as a dependency as possible so you can use whatever version you want

You already can. The test tools were using my dev version which had a bug which is why I got that error.

sayedihashimi commented 9 years ago

TFS:149246

webtools-bot commented 7 years ago

The GitHub Issue Tracker for the aspnet/Tooling repo is being deprecated in favor of Visual Studio's Report a Problem tool.

If this issue is still a problem with the RTW release of Visual Studio 2017, please report a new issue using the Report a Problem tool. While you can still use .NET Core and ASP.NET Preview tools with Visual Studio 2015, Visual Studio 2017 is now the officially supported tool for developing .NET Core and ASP.NET Core projects.

By using the Report a Problem tool (available in both VS 2017 and VS 2015), you can collect detailed information about the problem, and send it to Microsoft with just a few button clicks. See Visual Studio's Talk to Us page for more details.

Please use the discussion topic here for feedback and questions on the deprecation of this issue tracker. Thanks!