An open API service indexing awesome lists of open source software.

https://github.com/sgrumley/gotex

Go TUI for exploring and running test cases
https://github.com/sgrumley/gotex

go golang testing tooling

Last synced: 5 months ago
JSON representation

Go TUI for exploring and running test cases

Awesome Lists containing this project

README

          


Gotex



A cross-platform TUI Go Test Explorer for Go.


![Gotex Screenshot](img/screenshot-gotex.png)

# gotex

A Terminal User Interface (TUI) for discovering and executing Go tests with ease. Gotex provides an intuitive interface to navigate, filter and run your Go test suite from the terminal.

## Features

- Interactive terminal interface for browsing test packages, tests and test cases
- Fuzzy find tests or navigate the tree
- Allows for results to be parsed through other tools
- Vim like keybindings
- Rerun last test

## Installation
>[!Note]
> If color is not working along side tmux set `export COLORTERM=truecolor`

```bash
go install github.com/sgrumley/gotex@latest
```

## Usage

Navigate to your Go project directory and run:

```bash
gotex
```

### Keyboard Controls

- `j/k or ↑/↓`: Navigate through tests
- `h/l`: Expand or close child tests
- `r`: Run selected test
- `R`: Rerun last test
- `A`: Run all tests
- `/`: Search tests
- `s`: Sync project
- `c`: Config display
- `C`: Debug Console
- `ctrl-u/ ctrl-d`: Scroll text
- `gg`: Top of page
- `G`: Bottom of page
- `q`: Quit

## Configuration

Gotex can be configured using a provided yaml file:

```yaml
# Default configuration
json: false
timeout:
short: false
verbose: true
failfast: false
cover: true
# pipeto: tparse

```

## Requirements

- Go 1.16 or higher
- Terminal with 256 color support

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Acknowledgments

- Built with [tview](https://github.com/rivo/tview)
- [Tparse](https://github.com/mfridman/tparse) my preferred test output