You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of the main apprehensions in fully adopting Bazel within our team is the lack of good Code Lens options. We love clicking the green 'Run Test' play button to the left of our Unit Tests! Sadly the Go extension's code lens only allows tests to be ran via go test, not bazel test.
This extension goes a long way by allowing us to run a group of go_test through Bazel via the BUILD.bazel file, but it's still a little annoying to have to leave the test you're writing, switch to another file, then run several tests that are grouped into the go_test package at once.
It is nice to be able to run one test at a time, and it is also nice to not have to leave your source file.
It would be amazing if this extension could add Code Lens buttons to every test function, in the test sources themselves.
The command that it would need to run would need to be something like this:
bazel test --test_filter=TestFunctionName //package/internal:internal_test
I can imagine the process would be to search a folder, find the test path via BUILD.bazel file to find the test target. Then search through each *_test.go file to look for test functions, and substitute the function name into --test_filter=... for each code lens run button.
This feature would be fantastic, and is exactly what's missing from a great VSCode Bazel integration.
The text was updated successfully, but these errors were encountered:
One of the main apprehensions in fully adopting Bazel within our team is the lack of good Code Lens options. We love clicking the green 'Run Test' play button to the left of our Unit Tests! Sadly the Go extension's code lens only allows tests to be ran via
go test
, notbazel test
.This extension goes a long way by allowing us to run a group of
go_test
through Bazel via the BUILD.bazel file, but it's still a little annoying to have to leave the test you're writing, switch to another file, then run several tests that are grouped into thego_test
package at once.It is nice to be able to run one test at a time, and it is also nice to not have to leave your source file.
It would be amazing if this extension could add Code Lens buttons to every test function, in the test sources themselves.
The command that it would need to run would need to be something like this:
bazel test --test_filter=TestFunctionName //package/internal:internal_test
I can imagine the process would be to search a folder, find the test path via
BUILD.bazel
file to find the test target. Then search through each*_test.go
file to look for test functions, and substitute the function name into--test_filter=...
for each code lens run button.This feature would be fantastic, and is exactly what's missing from a great VSCode Bazel integration.
The text was updated successfully, but these errors were encountered: