gotip
Go Test Interactive Picker
About
gotip is a TUI application for interactively selecting and running Go tests.
Key features:
- Fuzzy filtering of test cases
- Detection of subtest names defined via table-driven tests (partial support)
- Run individual subtests or grouped subtests
Installation
go install github.com/lusingander/gotip/cmd/gotip@latest
Usage
Basic usage
In a directory containing a go.mod file, run:
gotip
While a test is selected, press Enter to run it using go test.
Passing additional arguments
You can pass extra flags directly to go test by appending them after --:
gotip -- -v -count=1
Running a parent test group
While a test is selected, press Backspace to move up to its parent test group.
This allows you to execute all subtests under that group.
For example, if you have TestFoo/Bar/Baz selected, pressing Backspace will select TestFoo/Bar, and running it will execute all tests under that prefix.
If subtest names could not be automatically discovered, gotip defaults to selecting the nearest available parent test.
Keybindings
| Key |
Description |
| Ctrl-c |
Quit |
| j ↓ |
Select next item |
| k ↑ |
Select previous item |
| l → |
Select next page |
| h ← |
Select previous page |
| Enter |
Run the selected test |
| Backspace |
Select parent test group |
| / |
Enter filtering mode |
| Enter |
Confirm filter (in filtering mode) |
| Esc |
Clear filtering mode |
| Ctrl-x |
Toggle filtering type |
Planned features
- Persistent test execution history with ability to re-run from history
- Launch with initial filter based on package or test name
- Customizable test command execution
- Custom keybindings
License
MIT