dotnet / vscode-csharp

Official C# support for Visual Studio Code
MIT License
2.86k stars 672 forks source link

Test Explorer Not always finding all tests when there's a mix of C# and F# projects #5087

Closed aligneddev closed 2 years ago

aligneddev commented 2 years ago

Issue Description

Test Explorer Not always finding all tests when there's a mix of C# and F#.

https://aligneddev.net/blog/2022/dotnet-dev-without-visual-studio/ in an existing project, I was having problems running tests where I had about 20 projects with a mix of C# and F#. It lead me to requesting VS Code.

I wasn't able to reproduce what I had before, where I had an exception in the code (maybe it was in F#...) and the whole VS Code would have to be restarted to kill the process and let me run the test again

Steps to Reproduce

I created a small repo. I used dotnet new to create a library that throws an exception, a c# unit test and an f# unit test. https://github.com/aligneddev/vsCodeTestRunnerCandFSharpMix

I installed the .Net Core Test Explorer extension by Jun Han

Expected Behavior

Refresh should show all of the tests every time

Actual Behavior

Refresh in the test explorer is only showing the Run in F#, sometimes shows both

Logs

OmniSharp log

Post the output from Output-->OmniSharp log here

C# log

Executing dotnet build in c:/git/dotnet/exceptionBreaksTestRunner/ Executing dotnet test --no-build --logger "trx;LogFileName=C:\Users\CA-KEV~1\AppData\Local\Temp\test-explorer-ABmGK4\0.trx" in c:/git/dotnet/exceptionBreaksTestRunner/ Process 31632 started Process 31632 finished

Environment information

VSCode version: 1.64.2 C# Extension: 1.24.1

Dotnet Information .NET SDK (reflecting any global.json): Version: 6.0.101 Commit: ef49f6213a Runtime Environment: OS Name: Windows OS Version: 10.0.19044 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\6.0.101\ Host (useful for support): Version: 6.0.2 Commit: 839cdfb0ec .NET SDKs installed: 3.1.416 [C:\Program Files\dotnet\sdk] 6.0.101 [C:\Program Files\dotnet\sdk] .NET runtimes installed: Microsoft.AspNetCore.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 5.0.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 6.0.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 5.0.14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] Microsoft.WindowsDesktop.App 6.0.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App] To install additional .NET runtimes or SDKs: https://aka.ms/dotnet-download
Visual Studio Code Extensions |Extension|Author|Version| |---|---|---| |angular-karma-test-explorer|raagh|1.2.8| |angular-schematics|cyrilletuzi|5.1.1| |Angular2|johnpapa|12.0.0| |armview|bencoleman|0.4.6| |auto-rename-tag|formulahendry|0.1.10| |azure-account|ms-vscode|0.10.0| |azure-pipelines|ms-azure-devops|1.195.0| |azurecli|ms-vscode|0.5.0| |azurerm-vscode-tools|msazurermtools|0.15.6| |beautify|HookyQR|1.5.0| |better-toml|bungcip|0.3.2| |code-spell-checker|streetsidesoftware|2.1.7| |copy-text|salbert|0.4.9| |csharp|ms-dotnettools|1.24.1| |csharp2ts|rafaelsalguero|0.0.26| |dark-plus-material|vangware|3.0.4| |docs-article-templates|docsmsft|0.2.11| |docs-build|docsmsft|0.3.9| |docs-images|docsmsft|0.0.9| |docs-linting|docsmsft|0.0.9| |docs-metadata|docsmsft|1.0.7| |docs-preview|docsmsft|0.3.57| |docs-scaffolding|docsmsft|0.0.12| |docs-visual-areas|docsmsft|0.2.1| |docs-yaml|docsmsft|0.2.7| |dotnet-interactive-vscode|ms-dotnettools|1.0.3103010| |dotnet-test-explorer|formulahendry|0.7.7| |git-graph|mhutchie|1.30.0| |git-tree-compare|letmaik|1.14.0| |gitkraken-authentication|gitkraken|1.0.3| |gitlab-ci-validator|cstuder|1.0.0| |gitlab-workflow|GitLab|3.40.2| |gitlens|eamodio|12.0.1| |html-css-class-completion|Zignd|1.20.0| |Ionide-fsharp|Ionide|5.11.0| |jasmine-problem-matcher|seansobey|1.0.1| |JasmineSnippets|xabikos|1.0.1| |jowtow-bloodmoon-theme|jowtow|0.0.3| |jshint|dbaeumer|0.11.0| |jupyter|ms-toolsai|2022.1.1301854968| |jupyter-keymap|ms-toolsai|1.0.0| |jupyter-renderers|ms-toolsai|1.0.6| |LinkCheckMD|blackmist|0.3.1| |markdown-mermaid|bierner|1.13.2| |markdown-shortcuts|mdickin|0.12.0| |mermaid-export|Gruntfuggly|0.0.8| |ng-template|Angular|13.2.4| |npm-intellisense|christian-kohler|1.4.1| |nuget-reverse-package-search|jesschadwick|0.1.68| |powershell|ms-vscode|2021.12.0| |prettier-vscode|esbenp|9.3.0| |pwa-tools|johnpapa|0.1.0| |python|ms-python|2022.0.1814523869| |quokka-vscode|WallabyJs|1.0.448| |razor-plus|austincummings|0.1.4| |refactorix|krizzdewizz|0.3.6| |remote-containers|ms-vscode-remote|0.224.2| |remote-wsl|ms-vscode-remote|0.64.2| |template-string-converter|meganrogge|0.6.0| |test-adapter-converter|ms-vscode|0.1.5| |vs-keybindings|ms-vscode|0.2.1| |vscode-aks-tools|ms-kubernetes-tools|0.0.13| |vscode-azureappservice|ms-azuretools|0.23.1| |vscode-azurefunctions|ms-azuretools|1.6.0| |vscode-azureresourcegroups|ms-azuretools|0.4.0| |vscode-azurestorage|ms-azuretools|0.13.0| |vscode-azurevirtualmachines|ms-azuretools|0.5.0| |vscode-bicep|ms-azuretools|0.4.1272| |vscode-codemetrics|kisstkondoros|1.24.0| |vscode-commons|redhat|0.0.6| |vscode-cosmosdb|ms-azuretools|0.18.1| |vscode-docker|ms-azuretools|1.20.0| |vscode-dotnet-pack|ms-dotnettools|1.0.8| |vscode-dotnet-runtime|ms-dotnettools|1.5.0| |vscode-icons|vscode-icons-team|11.10.0| |vscode-js-profile-flame|ms-vscode|1.0.0| |vscode-kubernetes-tools|ms-kubernetes-tools|1.3.6| |vscode-node-azure-pack|ms-vscode|0.2.1| |vscode-npm-script|eg2|0.3.24| |vscode-nuget-gallery|patcx|0.0.24| |vscode-pull-request-github|GitHub|0.36.2| |vscode-pylance|ms-python|2022.2.4| |vscode-service-fabric-reliable-services|ms-azuretools|0.1.6| |vscode-solution-explorer|fernandoescolar|0.4.5| |vscode-svgviewer|cssho|2.0.0| |vscode-test-explorer|hbenl|2.21.1| |vscode-tfs|generalov|2.0.0| |vscode-thunder-client|rangav|1.12.2| |vscode-typescript-tslint-plugin|ms-vscode|1.3.3| |vscode-yaml|redhat|1.4.0| |vscodeintellicode|VisualStudioExptTeam|1.2.17| |vsliveshare|ms-vsliveshare|1.0.5418| |vsliveshare-audio|ms-vsliveshare|0.1.91| |vsliveshare-pack|ms-vsliveshare|0.4.0| |wallaby-vscode|WallabyJs|1.0.327| |xml|DotJoshJohnson|2.5.1|;
JoeRobich commented 2 years ago

@aligneddev Sorry the C# extension does not currently provide a Test Explorer. It seems your issue is with the .Net Core Test Explorer. I believe you can log issues at https://github.com/formulahendry/vscode-dotnet-test-explorer/issues