golang / vscode-go

Go extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=golang.Go
Other
3.79k stars 729 forks source link

Add option to run tests in background by default #3154

Open leep-frog opened 5 months ago

leep-frog commented 5 months ago

Is your feature request related to a problem? Please describe.

This extension defaults to opening the output tab in the panel whenever a go test is run. This behavior should be configurable for a few reasons:

Describe the solution you'd like

I think there are two approaches:

  1. Provide supplementary commands for all test commands (e.g. go.test.package and go.test.packageAsync/Background)
  2. Allow test commands to accept a keybinding args object that allows individual keybindings to specify background behavior (and possibly other testConfig in the future).

Describe alternatives you've considered

I can use the multi-command extension to run go tests, then close the panel, then open the maximized panel, but that is inconsistent (without a long delay), and is a bad user experience

Additional context Add any other context or screenshots about the feature request here.

gopherbot commented 4 months ago

Change https://go.dev/cl/567995 mentions this issue: allow args.background parameter for go.test.* commands

hyangah commented 1 month ago

We hope to deprecate the old UI (the test output channel) in favor of the test explorer UI. (https://github.com/golang/vscode-go/issues/2044)

It looks like VSCode's testing.openTesting setting for the new UI is similar to what you want. How about using the setting instead of inventing a new knob that is going to be deprecated? Its default is openOnTestStart which matches the current behavior of the old UI's test output channel. What do you think?

leep-frog commented 1 month ago

Oh good to know about! When will the new go-test UI be released?

Thanks, Greg

On Wed, May 29, 2024 at 1:28 PM Hyang-Ah Hana Kim @.***> wrote:

We hope to deprecate the old UI (the test output channel) in favor of the test explorer UI. (#2044 https://github.com/golang/vscode-go/issues/2044 )

It looks like VSCode's testing.openTesting setting for the new UI is similar to what you want. How about using the setting instead of inventing a new knob that is going to be deprecated? Its default is openOnTestStart which matches the current behavior of the old UI's test output channel. What do you think?

— Reply to this email directly, view it on GitHub https://github.com/golang/vscode-go/issues/3154#issuecomment-2137922122, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP4ZD3H2Y7ROVWIIR2YOIATZEYF2RAVCNFSM6AAAAABCV2YCFOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZXHEZDEMJSGI . You are receiving this because you authored the thread.Message ID: @.***>