microsoft / microsoft/nodejstools

Run test using the vstest.console for dotnet

Open
#1,659 2 comments 0 reactions 1 assignee View on GitHub

@armanio123 is already working on this.

Since Jul 23, 2018.

feature test-adapter
Dominant language
C#
Stars
1.8k
Forks
355
PR merge metrics
No merged PRs in 30d

Description

Hello,

i'm trying to run the nodejs test tools using the vstest console for dotnet (2.0.0-preview2-006497).

I'm able to run the tests using the following command line:

"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe" "PathToProject\NodejsConsoleApp1.njsproj" /TestAdapterPath:"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Node.js Tools for Visual Studio\1.3"

The problem lies when I try to run it using the dotnet vstest. It always end up with the following message

No test is available in C:\Users\gfrancischini\source\repos\NodejsConsoleApp1\NodejsConsoleApp1\NodejsConsoleApp1.njsroj. Make sure test project has a nuget reference of package "Microsoft.NET.Test.Sdk" and framework version settings are appropriate and try again.

Log

TpTrace Verbose: 0 : 12480, 2, 2017/08/15, 19:20:56.752, 35950466517, vstest.console.dll, TestPluginCache: Discovering the extensions using extension path.
TpTrace Information: 0 : 12480, 2, 2017/08/15, 19:20:56.757, 35950472831, vstest.console.dll, AssemblyResolver: Microsoft.TestPlatform.TestHostRuntimeProvider: Resolving assembly.
TpTrace Information: 0 : 12480, 2, 2017/08/15, 19:20:56.758, 35950475119, vstest.console.dll, AssemblyResolver: Microsoft.TestPlatform.TestHostRuntimeProvider: Resolved assembly. 
TpTrace Information: 0 : 12480, 2, 2017/08/15, 19:20:56.760, 35950478903, vstest.console.dll, AssemblyResolver: Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger: Resolving assembly.
TpTrace Information: 0 : 12480, 2, 2017/08/15, 19:20:56.760, 35950480266, vstest.console.dll, AssemblyResolver: Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger: Resolved assembly. 
TpTrace Verbose: 0 : 12480, 2, 2017/08/15, 19:20:56.761, 35950482671, vstest.console.dll, TestPluginCache: Discovered the extensions using extension path ''.
TpTrace Verbose: 0 : 12480, 2, 2017/08/15, 19:20:56.761, 35950482790, vstest.console.dll, TestPluginCache: Discoverers are ''.
TpTrace Verbose: 0 : 12480, 2, 2017/08/15, 19:20:56.761, 35950482838, vstest.console.dll, TestPluginCache: Executors are ''.
TpTrace Verbose: 0 : 12480, 2, 2017/08/15, 19:20:56.761, 35950482887, vstest.console.dll, TestPluginCache: Setting providers are ''.
TpTrace Verbose: 0 : 12480, 2, 2017/08/15, 19:20:56.761, 35950482926, vstest.console.dll, TestPluginCache: Loggers are ''.
TpTrace Information: 0 : 12480, 2, 2017/08/15, 19:20:56.773, 35950506966, vstest.console.dll, RunTestsArgumentProcessor:Execute: Test run is starting.
TpTrace Verbose: 0 : 12480, 2, 2017/08/15, 19:20:56.773, 35950507158, vstest.console.dll, RunTestsArgumentProcessor:Execute: Queuing Test run.
TpTrace Information: 0 : 12480, 2, 2017/08/15, 19:20:56.773, 35950507752, vstest.console.dll, TestRequestManager.RunTests: run tests started.
TpTrace Verbose: 0 : 12480, 2, 2017/08/15, 19:20:56.889, 35950757070, vstest.console.dll, TestPluginCache: Updating loadOnlyWellKnownExtensions from False to True.
TpTrace Verbose: 0 : 12480, 2, 2017/08/15, 19:20:56.890, 35950757592, vstest.console.dll, TestPluginCache: Using directories for assembly resolution 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Node.js Tools for Visual Studio\1.3'.
TpTrace Verbose: 0 : 12480, 2, 2017/08/15, 19:20:56.890, 35950757691, vstest.console.dll, TestPluginCache: Updated the available extensions to 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Node.js Tools for Visual Studio\1.3\Microsoft.NodejsTools.TestAdapter.dll'.
TpTrace Verbose: 0 : 12480, 2, 2017/08/15, 19:20:56.894, 35950767775, vstest.console.dll, TestPluginCache: Updating loadOnlyWellKnownExtensions from True to True.
TpTrace Verbose: 0 : 12480, 2, 2017/08/15, 19:20:56.894, 35950768130, vstest.console.dll, TestPluginCache: Using directories for assembly resolution 'C:\Program Files\dotnet\sdk\2.0.0-preview2-006497\Extensions,C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Node.js Tools for Visual Studio\1.3'.
TpTrace Verbose: 0 : 12480, 2, 2017/08/15, 19:20:56.895, 35950768225, vstest.console.dll, TestPluginCache: Updated the available extensions to 'C:\Program Files\dotnet\sdk\2.0.0-preview2-006497\Extensions\Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger.dll,C:\Program Files\dotnet\sdk\2.0.0-preview2-006497\Extensions\Microsoft.TestPlatform.TestHostRuntimeProvider.dll,C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Node.js Tools for Visual Studio\1.3\Microsoft.NodejsTools.TestAdapter.dll'.
TpTrace Information: 0 : 12480, 2, 2017/08/15, 19:20:56.901, 35950781677, vstest.console.dll, TestPluginManager.CreateTestExtension: Attempting to load test extension: Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Hosting.DefaultTestHostManager
TpTrace Information: 0 : 12480, 2, 2017/08/15, 19:20:56.901, 35950782287, vstest.console.dll, TestPluginManager.CreateTestExtension: Attempting to load test extension: Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Hosting.DotnetTestHostManager
TpTrace Verbose: 0 : 12480, 2, 2017/08/15, 19:20:56.902, 35950783231, vstest.console.dll, TestEngine: Initializing Parallel Execution as MaxCpuCount is set to: 1
TpTrace Verbose: 0 : 12480, 2, 2017/08/15, 19:20:56.907, 35950795811, vstest.console.dll, TestRunRequest.ExecuteAsync: Creating test run request.
TpTrace Verbose: 0 : 12480, 2, 2017/08/15, 19:20:56.908, 35950796460, vstest.console.dll, TestRunRequest.ExecuteAsync: Starting.
TpTrace Information: 0 : 12480, 2, 2017/08/15, 19:20:56.908, 35950796740, vstest.console.dll, TestRunRequest.ExecuteAsync: Starting run with settings:TestRunCriteria:
   KeepAlive=False,FrequencyOfRunStatsChangeEvent=10,RunStatsChangeEventTimeout=00:00:01.5000000,TestCaseFilter=,TestExecutorLauncher=
   Settingsxml=<?xml version="1.0" encoding="utf-16"?><RunSettings><RunConfiguration><ResultsDirectory>C:\Users\gfrancischini\TestResults</ResultsDirectory><TargetPlatform>X86</TargetPlatform><TargetFrameworkVersion>.NETCoreApp,Version=v1.0</TargetFrameworkVersion><TestAdaptersPaths>C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Node.js Tools for Visual Studio\1.3;C:\Program Files\dotnet\sdk\2.0.0-preview2-006497\Extensions</TestAdaptersPaths></RunConfiguration></RunSettings>

TpTrace Verbose: 0 : 12480, 2, 2017/08/15, 19:20:56.908, 35950796844, vstest.console.dll, TestRunRequest.ExecuteAsync: Wait for the first run request is over.
TpTrace Information: 0 : 12480, 2, 2017/08/15, 19:20:56.909, 35950799077, vstest.console.dll, TestRunRequest.ExecuteAsync: Started.
TpTrace Verbose: 0 : 12480, 2, 2017/08/15, 19:20:56.909, 35950799402, vstest.console.dll, TestRunRequest.WaitForCompletion: Waiting with timeout -1.
TpTrace Information: 0 : 12480, 4, 2017/08/15, 19:20:56.909, 35950799433, vstest.console.dll, ProxyParallelExecutionManager: Triggering test run for next source: C:\Users\gfrancischini\source\repos\NodejsConsoleApp1\NodejsConsoleApp1\NodejsConsoleApp1.njsproj
TpTrace Verbose: 0 : 12480, 4, 2017/08/15, 19:20:56.909, 35950800026, vstest.console.dll, ProxyExecutionManager: Test host is non shared. Lazy initialize.
TpTrace Information: 0 : 12480, 4, 2017/08/15, 19:20:56.928, 35950840163, vstest.console.dll, Listening on port : 56263
TpTrace Verbose: 0 : 12480, 4, 2017/08/15, 19:20:56.940, 35950865554, vstest.console.dll, DotnetTestHostmanager: Full path of dotnet.exe is C:\Program Files\dotnet\dotnet.exe
TpTrace Verbose: 0 : 12480, 4, 2017/08/15, 19:20:56.940, 35950866226, vstest.console.dll, DotnetTestHostmanager: File C:\Users\gfrancischini\source\repos\NodejsConsoleApp1\NodejsConsoleApp1\NodejsConsoleApp1.runtimeconfig.json, doesnot exist
TpTrace Verbose: 0 : 12480, 4, 2017/08/15, 19:20:56.940, 35950866496, vstest.console.dll, DotnetTestHostmanager: File C:\Users\gfrancischini\source\repos\NodejsConsoleApp1\NodejsConsoleApp1\NodejsConsoleApp1.deps.json, doesnot exist
TpTrace Information: 0 : 12480, 4, 2017/08/15, 19:20:56.940, 35950866767, vstest.console.dll, AssemblyResolver: Microsoft.Extensions.DependencyModel: Resolving assembly.
TpTrace Information: 0 : 12480, 4, 2017/08/15, 19:20:56.941, 35950868558, vstest.console.dll, AssemblyResolver: Microsoft.Extensions.DependencyModel: Resolved assembly. 
TpTrace Verbose: 0 : 12480, 4, 2017/08/15, 19:20:56.942, 35950869331, vstest.console.dll, DotnetTestHostManager: Assume published test project, with test host path = C:\Users\gfrancischini\source\repos\NodejsConsoleApp1\NodejsConsoleApp1\testhost.dll.
TpTrace Information: 0 : 12480, 4, 2017/08/15, 19:20:56.942, 35950870075, vstest.console.dll, AssemblyResolver: Microsoft.TestPlatform.TestHostRuntimeProvider.resources: Resolving assembly.
TpTrace Information: 0 : 12480, 4, 2017/08/15, 19:20:56.943, 35950871564, vstest.console.dll, AssemblyResolver: Microsoft.TestPlatform.TestHostRuntimeProvider.resources: Resolving assembly.
TpTrace Verbose: 0 : 12480, 4, 2017/08/15, 19:20:56.943, 35950872495, vstest.console.dll, DotnetTestHostmanager: No test is available in C:\Users\gfrancischini\source\repos\NodejsConsoleApp1\NodejsConsoleApp1\NodejsConsoleApp1.njsproj. Make sure test project has a nuget reference of package "Microsoft.NET.Test.Sdk" and framework version settings are appropriate and try again.
TpTrace Error: 0 : 12480, 4, 2017/08/15, 19:20:56.964, 35950917883, vstest.console.dll, ProxyExecutionManager.StartTestRun: Failed to start test run: System.IO.FileNotFoundException: No test is available in C:\Users\gfrancischini\source\repos\NodejsConsoleApp1\NodejsConsoleApp1\NodejsConsoleApp1.njsproj. Make sure test project has a nuget reference of package "Microsoft.NET.Test.Sdk" and framework version settings are appropriate and try again.
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Hosting.DotnetTestHostManager.GetTestHostProcessStartInfo(IEnumerable`1 sources, IDictionary`2 environmentVariables, TestRunnerConnectionInfo connectionInfo)
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyOperationManager.SetupChannel(IEnumerable`1 sources)
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyExecutionManager.InitializeExtensions(IEnumerable`1 sources)
   at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client.ProxyExecutionManager.StartTestRun(TestRunCriteria testRunCriteria, ITestRunEventsHandler eventHandler)
TpTrace Verbose: 0 : 12480, 4, 2017/08/15, 19:20:57.056, 35951113999, vstest.console.dll, TestRunRequest:SendTestRunMessage: Starting.
TpTrace Information: 0 : 12480, 4, 2017/08/15, 19:20:57.056, 35951115142, vstest.console.dll, TestRunRequest:SendTestRunMessage: Completed.
TpTrace Verbose: 0 : 12480, 4, 2017/08/15, 19:20:57.766, 35952635939, vstest.console.dll, TestRunRequest:TestRunComplete: Starting. IsAborted:False IsCanceled:False.
TpTrace Information: 0 : 12480, 4, 2017/08/15, 19:20:57.768, 35952639914, vstest.console.dll, TestRunRequest:TestRunComplete: Completed.
TpTrace Verbose: 0 : 12480, 2, 2017/08/15, 19:20:57.768, 35952640236, vstest.console.dll, TestRunRequest.Dispose: Starting.
TpTrace Information: 0 : 12480, 2, 2017/08/15, 19:20:57.768, 35952640448, vstest.console.dll, TestRunRequest.Dispose: Completed.
TpTrace Information: 0 : 12480, 2, 2017/08/15, 19:20:57.768, 35952640588, vstest.console.dll, TestRequestManager.RunTests: run tests completed, sucessful: True.
TpTrace Information: 0 : 12480, 2, 2017/08/15, 19:20:57.768, 35952640697, vstest.console.dll, RunTestsArgumentProcessor:Execute: Test run is completed.
TpTrace Verbose: 0 : 12480, 2, 2017/08/15, 19:20:57.768, 35952640836, vstest.console.dll, Executor.Execute: Exiting with exit code of 1

Thank you for the help.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.