question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

VSTest : cannot start UWP unit test

See original GitHub issue

Hi,

When I am launching unit testing of a UWP library, I always got an exception. (See stack trace below) I created a Powershell script that launch vstest.console.exe, it crashes with the same exception also.

If I launch vastest.console.exe (or my powershell) manually, it works. But when it is launch by VSTS I got an exception.

I use VSTS, and a build machine (a VS2015 Azure VM).

Is it an issue, or am I missing something??

Cheers

Olivier

Application: vstest.console.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.ArgumentNullException at Microsoft.VisualStudio.TestPlatform.ObjectModel.ValidateArg.NotNull[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.__Canon, System.String) at Microsoft.VisualStudio.TestPlatform.Client.LocalCrashDumpUtilities.TryGetLocalCrashDumpPath(System.String, System.String ByRef) at Microsoft.VisualStudio.TestPlatform.Client.TestExecutorServiceClient.TryGetLocalCrashDumpPath(System.String, System.String ByRef) at Microsoft.VisualStudio.TestPlatform.Client.TestExecutorServiceClient.GetTestRunAbortedMessage(System.String, Int32, Boolean, Boolean) at Microsoft.VisualStudio.TestPlatform.Client.TestExecutorServiceClient.TestExecutorServiceChannel_Reset(System.Object, System.EventArgs) at System.ServiceModel.Channels.CommunicationObject.OnClosed()

Exception Info: System.Runtime.CallbackException at System.ServiceModel.Channels.CommunicationObject.OnClosed() at System.ServiceModel.ServiceHostBase.OnClosed() at System.ServiceModel.ServiceHost.OnClosed() at System.ServiceModel.Channels.CommunicationObject.Close(System.TimeSpan) at Microsoft.VisualStudio.TestPlatform.Client.UniversalTestExecutorProxy.Close() at Microsoft.VisualStudio.TestPlatform.Client.TestExecutorServiceClient.StarPlatformSpecificTestExecution(Microsoft.VisualStudio.TestPlatform.Client.IPlatformTestExecutorClient, Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.ITestExecutorLauncher, Microsoft.VisualStudio.TestPlatform.ObjectModel.Architecture, Microsoft.VisualStudio.TestPlatform.ObjectModel.FrameworkVersion) at Microsoft.VisualStudio.TestPlatform.Client.TestExecutorServiceClient.Initialize_NoLock(Microsoft.VisualStudio.TestPlatform.ObjectModel.Architecture, Microsoft.VisualStudio.TestPlatform.ObjectModel.FrameworkVersion) at Microsoft.VisualStudio.TestPlatform.Client.TestExecutorServiceClient.EnsureInitialized(System.Collections.Generic.IDictionary2<System.String,System.String>, Microsoft.VisualStudio.TestPlatform.Core.TestExecutionContext) at Microsoft.VisualStudio.TestPlatform.Client.TestExecutorServiceClient+<>c__DisplayClass18_0.<StartTestRun>b__0() at Microsoft.VisualStudio.TestPlatform.Client.TestExecutorServiceClient.InvokeTestExecutorServiceAction(System.Action) at Microsoft.VisualStudio.TestPlatform.Client.TestExecutorServiceClient.StartTestRun(System.Collections.Generic.IEnumerable1<System.String>, Microsoft.VisualStudio.TestPlatform.Core.TestExecutionContext, System.String, System.Collections.Generic.IDictionary2<System.String,System.String>, System.String, Microsoft.VisualStudio.TestPlatform.Core.ITestCaseLog, Microsoft.VisualStudio.TestPlatform.Core.ITestRunLog, Microsoft.VisualStudio.TestPlatform.Core.IFrameworkHandleInternal) at Microsoft.VisualStudio.TestPlatform.Client.Rocksteady.RocksteadyExecutionManager.StartTestRun(Microsoft.VisualStudio.TestPlatform.ObjectModel.Client.TestRunCriteria, Boolean, Microsoft.VisualStudio.TestPlatform.Client.DataCollectionParameters, Microsoft.VisualStudio.TestPlatform.Client.ITestRunEventsHandler) at Microsoft.VisualStudio.TestPlatform.Client.TestRunRequest.ExecuteAsync() at Microsoft.VisualStudio.TestPlatform.CommandLine.Processors.RunTestsArgumentProcessor.RunTests(System.Collections.Generic.IEnumerable1<System.String>, System.String, System.String, Boolean, Boolean) at Microsoft.VisualStudio.TestPlatform.CommandLine.Processors.RunTestsArgumentProcessor.ExecuteAppContainerSources(System.Collections.Generic.List`1<System.String>, System.String, Boolean) at Microsoft.VisualStudio.TestPlatform.CommandLine.Processors.RunTestsArgumentProcessor.Execute() at Microsoft.VisualStudio.TestPlatform.CommandLine.Executor.Execute(System.String[]) at RockSteady.Program.Main(System.String[])

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
kaadhinacommented, Jul 4, 2016

Can you please try running the build agent using non-admin credentials? UWP tests cannot be run as admin.

0reactions
mtaroncommented, Jul 4, 2016

Running the agent as non-admin worked! Thanks very much. 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't run UWP tests from vstest.console.exe in VS 15.6.2 #1477
Description I am unable to run UWP tests from the VS test console (vstest.console.exe). I get the error: No suitable test runtime provider...
Read more >
UWP Unit tests won't run due to network issue.
I'm not sure exactly when it happened, but unit tests simply won't run anymore. Test explorer can find all the tests but when...
Read more >
"Failed to activate app" when trying to run UWP unit tests as ...
We have a UWP app with unit tests that run fine from Visual Studio. However, we are running into issues when trying to...
Read more >
Running UWP Unit Tests as part of an Azure DevOps Pipeline
The UWP unit test projects are not built as a DLL, but as an EXE. I stupidly just made my VSTest task look...
Read more >
Get started with unit testing - Visual Studio (Windows)
Create unit tests ; test in the search box to find a unit test project template for the test framework you want to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found