Unable to display tests in Test Explorer 0.7.4 and VSCode 1.51
See original GitHub issueHi, since VS Code 1.51 I am unable to get Test Explorer displaying tests. I am pretty sure it worked in VS Code 1.50.1.
dotnet --list-sdks
3.1.202 [C:\Program Files\dotnet\sdk]
3.1.301 [C:\Program Files\dotnet\sdk]
3.1.401 [C:\Program Files\dotnet\sdk]
5.0.100 [C:\Program Files\dotnet\sdk]
dotnet --info
.NET SDK (reflecting any global.json):
Version: 5.0.100
Commit: 5044b93829
Runtime Environment:
OS Name: Windows
OS Version: 10.0.18363
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\5.0.100\
Host (useful for support):
Version: 5.0.0
Commit: cf258a14b7
.NET SDKs installed:
3.1.202 [C:\Program Files\dotnet\sdk]
3.1.301 [C:\Program Files\dotnet\sdk]
3.1.401 [C:\Program Files\dotnet\sdk]
5.0.100 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.All 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.23 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
To install additional .NET runtimes or SDKs:
https://aka.ms/dotnet-download
Technically dotnet test -t -v=q *.csproj
itself lists all relevant tests by running manually using suggested command in the output log of Test Explorer.
However I’ve seen machine running .NET Core 3.1.9 and it has the same problem. It looks like there’s breaking change between versions of VSCode 1.50.1 and 1.51.
Current workaround: downgrade to VSCode 1.50.1.
Thanks for investigating.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:15
Top Results From Across the Web
Test Explorer is not discovering tests - Visual Studio Feedback
It may be that you are on an early enough version of 16.2 that you still had access to the required extension for...
Read more >VS Code Test Explorer can't find tests - Stack Overflow
We must test a new feature before pushing it to production. For some reason we can't access our tests with Visual Studio Code...
Read more >Python Test Explorer VSCode Extension 0.7.1 - Chocolatey
Shows a Test Explorer in the Test view in VS Code's sidebar with all detected tests ... Shows a failed test's log when...
Read more >Python Test Explorer for Visual Studio Code
Shows a Test Explorer in the Test view in VS Code's sidebar with all detected tests and suites and their state · Convenient...
Read more >Interactive Unit Testing with .NET Core and VS Code
NET Core Test Explorer. Figure 4 illustrates how to access extensions and, more specifically, how to search for and view the details for...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had the same issue, Test Explorer 0.7.4 and VSCode 1.51, in my case with .NET 5. It looks to me like the regex in extractAssemblyPaths() is out of date.
The regex is:
But my .NET 5 output from
dotnet test -t -v=q
has an additional space:The quick fix for me on Windows was to open
%USERPROFILE%\.vscode\extensions\formulahendry.dotnet-test-explorer-0.7.4\out\src\testDiscovery.js
and edit the following:to:
to cope with the extra whitespace.
Thanks for reporting this. We’ll try and find a regexp that works for both core and .net 5.