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

VsTestConsoleWrapper.DiscoverTests throughs exception if VsTestConsoleWrapper.InitializeExtensions is not called with non null parameter #823

Closed
Faizan2304 opened this issue May 19, 2017 · 0 comments
Assignees

Comments

@Faizan2304
Copy link
Contributor

Faizan2304 commented May 19, 2017

Exception:

Parameter name: o
   at Newtonsoft.Json.Linq.JToken.FromObjectInternal(Object o, JsonSerializer jsonSerializer)
   at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.JsonDataSerializer.SerializePayload(String messageType, Object payload, Int32 version)
   at Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.SocketCommunicationManager.SendMessage(String messageType, Object payload, Int32 version)
   at Microsoft.TestPlatform.VsTestConsole.TranslationLayer.VsTestConsoleRequestSender.InitializeExtensions(IEnumerable 1 pathToAdditionalExtensions)
   at Microsoft.TestPlatform.VsTestConsole.TranslationLayer.VsTestConsoleWrapper.EnsureInitialized()
   at Microsoft.TestPlatform.VsTestConsole.TranslationLayer.VsTestConsoleWrapper.DiscoverTests(IEnumerable`1 sources, String discoverySettings, ITestDiscoveryEventsHandler discoveryEventsHandler)

Root cause

When we don't initialize VsTestConsoleWrapper.pathToAdditionalExtensions with non null value the default value of VsTestConsoleWrapper.pathToAdditionalExtensions become null and hence serialization function through exception.

Fix

initialize VsTestConsoleWrapper.pathToAdditionalExtensions in constructor with empty list.

@Faizan2304 Faizan2304 self-assigned this May 19, 2017
Faizan2304 pushed a commit to Faizan2304/vstest that referenced this issue May 19, 2017
Faizan2304 added a commit that referenced this issue May 19, 2017
* Issue: #823

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

No branches or pull requests

1 participant