microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.59k stars 29.03k forks source link

Run test using code lens does not open Test Results view #202895

Closed jibbers42 closed 9 months ago

jibbers42 commented 9 months ago

Type: Bug

When using the "Run" code lens button, I'd like vscode to open the Test Results view. It sometimes opens the Debug Console and other times the only noticeable UI change is a badge number indicator showing on the Test Explorer icon. If I use the green button to the left in the "well" (I think that's what the area is called), then it does switch to the Test Results view.

If I change "testing.openTesting" to "openExplorerOnTestStart", then the code lens Run button only shows the badge indicator while the test is running (or maybe it sometimes will show Debug Console inconsistently as above, but I didn't see that). The green test button in the well does open the Text Explorer as configured.

It's a Dart/Flutter project if that makes a difference.

image

VS Code version: Code 1.85.2 (8b3775030ed1a69b13e4f4c628c612102e30a681, 2024-01-18T06:40:10.514Z) OS version: Windows_NT x64 10.0.22631 Modes:

System Info |Item|Value| |---|---| |CPUs|AMD Ryzen 5 5600H with Radeon Graphics (12 x 3294)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|55.92GB (26.74GB free)| |Process Argv|--crash-reporter-id 4707a540-1340-4b43-9b1d-bdb4b64b2a9f| |Screen Reader|no| |VM|0%|
Extensions (120) Extension|Author (truncated)|Version ---|---|--- better-comments|aar|3.0.2 namespace|adr|1.1.2 user-secrets|adr|2.0.1 Bookmarks|ale|13.4.2 flutter-snippets|ale|3.0.0 toggle-excluded-files|amo|2023.4.1012 httpbook|anw|3.2.3 vscode-httpyac|anw|6.11.2 vscode-zipfs|arc|3.0.0 svelte-intellisense|ard|0.7.1 github-markdown-preview|bie|0.3.0 markdown-checkbox|bie|0.4.0 markdown-emoji|bie|0.3.0 markdown-footnotes|bie|0.1.1 markdown-mermaid|bie|1.21.0 markdown-preview-github-styles|bie|2.0.3 markdown-yaml-preamble|bie|0.1.0 freezed|bla|0.9.6 vscode-tailwindcss|bra|0.10.5 hide-node-modules|chr|1.1.8 ccs-flutter-color|cir|1.2.2 lockhunter-cmds|clm|0.2.2 gitignore|cod|0.9.0 rust-playground|Con|0.2.2 dart-code|Dar|3.80.0 flutter|Dar|3.80.0 msbuild-solution-syntax|dei|0.0.1 fold-level|den|0.0.2 EditorConfig|Edi|0.16.4 LogFileHighlighter|emi|2.17.0 git-watch-vscode-rename|eri|1.1.0 vscode-solution-explorer|fer|0.8.5 vscode-firefox-debug|fir|2.9.10 auto-close-tag|for|0.5.15 auto-rename-tag|for|0.1.10 dotnet-test-explorer|for|0.7.8 shell-format|fox|7.2.5 sort-json-array|fvc|3.1.0 build-runner|gae|0.8.0 copilot|Git|1.152.662 copilot-chat|Git|0.12.2023120701 remotehub|Git|0.62.0 vscode-github-actions|git|0.26.2 vscode-pull-request-github|Git|0.78.1 flutter-stylizer|gml|0.1.16 go|gol|0.40.1 todo-tree|Gru|0.0.226 vscode-git-cruise|Guo|0.2.4 vscode-drawio|hed|1.6.6 githd|hui|2.3.3 rest-client|hum|0.25.1 Ionide-fsharp|Ion|7.17.0 search-node-modules|jas|1.3.0 roslynator|jos|4.9.0 commitlint|jos|2.4.7 google-search|kam|0.0.1 csharpextensions|kre|1.7.3 bash-ide-vscode|mad|1.39.0 infersharp-ext|mat|4.1.0 rainbow-csv|mec|3.11.0 git-graph|mhu|1.30.0 gitignore|mic|1.0.1 vscode-dapr|ms-|0.8.0 vscode-docker|ms-|1.28.0 csharp|ms-|2.15.30 dotnet-interactive-vscode|ms-|1.0.5063010 vscode-dotnet-runtime|ms-|2.0.0 playwright|ms-|1.0.21 sarif-viewer|MS-|3.4.2 jupyter|ms-|2023.11.1100101639 jupyter-keymap|ms-|1.1.2 jupyter-renderers|ms-|1.0.17 vscode-jupyter-cell-tags|ms-|0.1.8 vscode-jupyter-slideshow|ms-|0.1.5 remote-containers|ms-|0.330.0 remote-wsl|ms-|0.81.9 azure-repos|ms-|0.38.0 hexeditor|ms-|1.9.12 powershell|ms-|2024.0.0 remote-repositories|ms-|0.40.0 vscode-flutter-freezed-helper|mth|0.1.0 gremlins|nho|0.26.0 indent-rainbow|ode|8.3.1 open-in-new-window|ona|1.1.0 select-compare-tabs|out|1.0.3 grpc-client|pas|2.0.4 vscode-versionlens|pfl|1.9.2 trusty-rusty-snippets|pol|0.0.5 pub-manager|qle|0.3.1 quicktype|qui|12.0.46 copy-filename-from-menu|rat|0.0.4 vscode-commons|red|0.0.6 vscode-xml|red|0.26.1 vscode-sort-json|ric|1.20.0 flutter-riverpod-snippets|rob|1.2.2 rust-analyzer|rus|0.3.1807 vscode-svelte-snippets|rya|0.6.1 crates|ser|0.6.5 markdown-preview-enhanced|shd|0.8.11 svg-preview|Sim|2.8.3 reveal|smu|1.2.7 rewrap|stk|1.16.3 code-spell-checker|str|3.0.1 svelte-vscode|sve|108.2.1 even-better-toml|tam|0.19.2 shellcheck|tim|0.35.0 msbuild-project-tools|tin|0.6.0 sort-lines|Tyr|1.11.0 vscode-lldb|vad|1.10.0 highlight-matching-tag|vin|0.11.0 intellicode-api-usage-examples|Vis|0.2.8 vscodeintellicode|Vis|1.2.30 keyoti-changeallendoflinesequence|vs-|0.0.3 vscode-gradle|vsc|3.13.5 volar|Vue|1.8.27 gitblame|wad|10.6.0 vscode-surround|yat|1.5.0 json|Zai|2.0.2 vscode-auto-open-workspace|zom|0.0.4 vscode-proto3|zxh|0.5.5 (5 theme extensions excluded)
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vswsl492:30256859 vscorecescf:30445987 vscod805cf:30301675 binariesv615:30325510 vsaa593cf:30376535 py29gd2263:30899288 vsclangdc:30486549 c4g48928:30535728 azure-dev_surveyone:30548225 2i9eh265:30646982 962ge761:30933248 pythongtdpath:30769146 welcomedialog:30910333 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pyreplss1:30897532 pythonmypyd1:30879173 pythoncet0:30885854 pythontbext0:30879054 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 ```
connor4312 commented 9 months ago

That code lens is provided by an extension you have installed, no VS Code itself

vscodenpa commented 9 months ago

This issue is caused by an extension, please file it with the repository (or contact) the extension has linked in its overview in VS Code or the marketplace for VS Code. See also our issue reporting guidelines. If you don't know which extension is causing the problem, you can run Help: Start extension bisect from the command palette (F1) to help identify the problem extension.

Happy Coding!

jibbers42 commented 9 months ago

Apologies, considering the setting is under Features|Testing, I assumed the switching behavior was probably a core vscode feature.

connor4312 commented 9 months ago

testing.openTesting does not take effect if the test run was triggered programmatically by the extension, only if triggered by the user. However, the extension could read that setting and follow its behavior if desired.