vscode-dotnet-test-explorer: Unable to display tests in Test Explorer 0.7.4 and VSCode 1.51
Hi, 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.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 3
- Comments: 15
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.
I’ve pushed a change included in 0.7.5 that hopefully fixes the problems you’re having. As soon as @formulahendry is able to push the new version to the market place it should be available to you.
Sorry guys for the long wait, @formulahendry is not responding (might be on holiday or something) and I don’t have a way of pushing a new release myself.
@stefanforsberg NUnit here as well.
Thank you so much for the quick turn-around. Now I’m just waiting for the new version to be published. 😃