vscode-go icon indicating copy to clipboard operation
vscode-go copied to clipboard

vscode command `Test: Rerun Last run` should support tests launched using "run test" codelense button.

Open maximkosov opened this issue 3 months ago • 3 comments

Is your feature request related to a problem? Please describe. vscode command Test: Rerun Last run doesn't work when you run your tests using codelense or Go: Test command.

There are several ways to run go test:

  • Using codelense run test.
  • Running a command e.g. Go: Test File, Go: Test Package.
  • By locating and running a test from Testing tab.

Looks like Test: Rerun Last run only remembers runs triggered using Testing tab.

Describe the solution you'd like I think test runs should be remembered by vscode if you run them using vscode.tests.TestController.createTestRun. We can create a vscode command that is using the controller instead of spawning a process manually.

Describe alternatives you've considered Alternatively we could introduce custom version of Rerun Last run i.e. Go: Rerun Last run. Go extension can remember test runs that were triggered using Go command or codelense.

Additional context

maximkosov avatar Aug 27 '25 13:08 maximkosov