Description
Google Tests cannot be run using the Test Adapter for Google Test that ships with Visual Studio with C++ installed.
Steps to reproduce
Using a Visual studio 16.10 preview build with "Desktop development with C++ installed".
File->New->Project and create a Google Test project choosing all the default options.
Open the Test Explorer.
Build the sample test.
Notice the test is discovered.
Run the test in the Test Explorer.
Expected behavior
Test is successfully run.
Actual behavior
The test is not run, and there is an error in the Tests output window pane "Could not find test executor with URI 'executor://testadapterforgoogletest/v1'. Make sure that the test executor is installed and supports .net runtime version ."
Diagnostic logs
I’ve enabled “Trace” logs from Test->Options->Logging Level. That puts out diagnostic test platform logs under %temp%\TestPlatformLogs. Looking at the vstest.console log (logs.txt) I see that the Test Explorer is initializing the platform with google test adapter:
TpTrace Information: 0 : 16128, 1, 2021/04/08, 06:15:13.075, 10351613562, vstest.console.exe, DesignModeClient.ProcessRequests: Processing Message: (Extensions.Initialize) -> [
"C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\INTPREV\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\EBF\TESTEXPLORER\Microsoft.VisualStudio.Workspace.ExternalBuildFramework.TestProvider.dll",
"C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\INTPREV\COMMON7\IDE\EXTENSIONS\FHJUPEZ5.Z5O\BoostTestAdapter.dll",
"C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\INTPREV\COMMON7\IDE\EXTENSIONS\FYY32XX5.ELU\GoogleTestAdapter.TestAdapter.dll",
"C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\INTPREV\COMMON7\IDE\EXTENSIONS\MICROSOFT\NODEJSTOOLS\TESTADAPTER\Microsoft.NodejsTools.TestAdapter.dll",
"C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\INTPREV\COMMON7\IDE\EXTENSIONS\MICROSOFT\PYTHON\CORE\Microsoft.PythonTools.TestAdapter.Executor.dll"
]
The discovery process logs also indicate that the adapter is passed on to it (logs.host*_6.txt):
TpTrace Information: 0 : 13920, 7, 2021/04/08, 06:15:13.712, 10357985541, testhost.x86.exe, TestRequestHandler.ProcessRequests: received message: (TestDiscovery.Initialize) -> [
"C:\Program Files (x86)\Microsoft Visual Studio\2019\intprev\Common7\IDE\Extensions\TestPlatform\Extensions\Microsoft.Cci.dll",
….
"C:\Program Files (x86)\Microsoft Visual Studio\2019\intprev\Common7\IDE\Extensions\TestPlatform\Extensions\Microsoft.VisualStudio.TraceDataCollector.dll",
"C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\INTPREV\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\EBF\TESTEXPLORER\Microsoft.VisualStudio.Workspace.ExternalBuildFramework.TestProvider.dll",
"C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\INTPREV\COMMON7\IDE\EXTENSIONS\FHJUPEZ5.Z5O\BoostTestAdapter.dll",
"C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\INTPREV\COMMON7\IDE\EXTENSIONS\FYY32XX5.ELU\GoogleTestAdapter.TestAdapter.dll",
"C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\INTPREV\COMMON7\IDE\EXTENSIONS\MICROSOFT\NODEJSTOOLS\TESTADAPTER\Microsoft.NodejsTools.TestAdapter.dll",
"C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\INTPREV\COMMON7\IDE\EXTENSIONS\MICROSOFT\PYTHON\CORE\Microsoft.PythonTools.TestAdapter.Executor.dll"
]
The test execution process logs on the other hand do not get initialized with the adapter(logs.host*_10.txt):
TpTrace Information: 0 : 3600, 8, 2021/04/08, 06:15:16.140, 10382260681, testhost.x86.exe, TestRequestHandler.ProcessRequests: received message: (TestExecution.Initialize) -> [
"C:\Program Files (x86)\Microsoft Visual Studio\2019\intprev\Common7\IDE\Extensions\TestPlatform\Extensions\Microsoft.Cci.dll",
…
"C:\Program Files (x86)\Microsoft Visual Studio\2019\intprev\Common7\IDE\Extensions\TestPlatform\Extensions\Microsoft.VisualStudio.TraceDataCollector.dll",
"C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\INTPREV\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\EBF\TESTEXPLORER\Microsoft.VisualStudio.Workspace.ExternalBuildFramework.TestProvider.dll",
"C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\INTPREV\COMMON7\IDE\EXTENSIONS\MICROSOFT\NODEJSTOOLS\TESTADAPTER\Microsoft.NodejsTools.TestAdapter.dll"
]
Environment
Visual studio 16.10 Preview 3.0
AB#1315248
Description
Google Tests cannot be run using the Test Adapter for Google Test that ships with Visual Studio with C++ installed.
Steps to reproduce
Using a Visual studio 16.10 preview build with "Desktop development with C++ installed".
File->New->Project and create a Google Test project choosing all the default options.
Open the Test Explorer.
Build the sample test.
Notice the test is discovered.
Run the test in the Test Explorer.
Expected behavior
Test is successfully run.
Actual behavior
The test is not run, and there is an error in the Tests output window pane "Could not find test executor with URI 'executor://testadapterforgoogletest/v1'. Make sure that the test executor is installed and supports .net runtime version ."
Diagnostic logs
I’ve enabled “Trace” logs from Test->Options->Logging Level. That puts out diagnostic test platform logs under %temp%\TestPlatformLogs. Looking at the vstest.console log (logs.txt) I see that the Test Explorer is initializing the platform with google test adapter:
TpTrace Information: 0 : 16128, 1, 2021/04/08, 06:15:13.075, 10351613562, vstest.console.exe, DesignModeClient.ProcessRequests: Processing Message: (Extensions.Initialize) -> [
"C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\INTPREV\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\EBF\TESTEXPLORER\Microsoft.VisualStudio.Workspace.ExternalBuildFramework.TestProvider.dll",
"C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\INTPREV\COMMON7\IDE\EXTENSIONS\FHJUPEZ5.Z5O\BoostTestAdapter.dll",
"C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\INTPREV\COMMON7\IDE\EXTENSIONS\FYY32XX5.ELU\GoogleTestAdapter.TestAdapter.dll",
"C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\INTPREV\COMMON7\IDE\EXTENSIONS\MICROSOFT\NODEJSTOOLS\TESTADAPTER\Microsoft.NodejsTools.TestAdapter.dll",
"C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\INTPREV\COMMON7\IDE\EXTENSIONS\MICROSOFT\PYTHON\CORE\Microsoft.PythonTools.TestAdapter.Executor.dll"
]
The discovery process logs also indicate that the adapter is passed on to it (logs.host*_6.txt):
TpTrace Information: 0 : 13920, 7, 2021/04/08, 06:15:13.712, 10357985541, testhost.x86.exe, TestRequestHandler.ProcessRequests: received message: (TestDiscovery.Initialize) -> [
"C:\Program Files (x86)\Microsoft Visual Studio\2019\intprev\Common7\IDE\Extensions\TestPlatform\Extensions\Microsoft.Cci.dll",
….
"C:\Program Files (x86)\Microsoft Visual Studio\2019\intprev\Common7\IDE\Extensions\TestPlatform\Extensions\Microsoft.VisualStudio.TraceDataCollector.dll",
"C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\INTPREV\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\EBF\TESTEXPLORER\Microsoft.VisualStudio.Workspace.ExternalBuildFramework.TestProvider.dll",
"C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\INTPREV\COMMON7\IDE\EXTENSIONS\FHJUPEZ5.Z5O\BoostTestAdapter.dll",
"C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\INTPREV\COMMON7\IDE\EXTENSIONS\FYY32XX5.ELU\GoogleTestAdapter.TestAdapter.dll",
"C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\INTPREV\COMMON7\IDE\EXTENSIONS\MICROSOFT\NODEJSTOOLS\TESTADAPTER\Microsoft.NodejsTools.TestAdapter.dll",
"C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\INTPREV\COMMON7\IDE\EXTENSIONS\MICROSOFT\PYTHON\CORE\Microsoft.PythonTools.TestAdapter.Executor.dll"
]
The test execution process logs on the other hand do not get initialized with the adapter(logs.host*_10.txt):
TpTrace Information: 0 : 3600, 8, 2021/04/08, 06:15:16.140, 10382260681, testhost.x86.exe, TestRequestHandler.ProcessRequests: received message: (TestExecution.Initialize) -> [
"C:\Program Files (x86)\Microsoft Visual Studio\2019\intprev\Common7\IDE\Extensions\TestPlatform\Extensions\Microsoft.Cci.dll",
…
"C:\Program Files (x86)\Microsoft Visual Studio\2019\intprev\Common7\IDE\Extensions\TestPlatform\Extensions\Microsoft.VisualStudio.TraceDataCollector.dll",
"C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\INTPREV\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\EBF\TESTEXPLORER\Microsoft.VisualStudio.Workspace.ExternalBuildFramework.TestProvider.dll",
"C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO\2019\INTPREV\COMMON7\IDE\EXTENSIONS\MICROSOFT\NODEJSTOOLS\TESTADAPTER\Microsoft.NodejsTools.TestAdapter.dll"
]
Environment
Visual studio 16.10 Preview 3.0
AB#1315248