# gotl
Run and view Go test results grouped by package and test cases. Read logs for each test case separately.
## Installation
Pre-built binaries can be found under the releases section on Github for each major operating system.
The binary can also be installed with cargo from crates.io or Github.
```bash
cargo install gotl --locked
```
```bash
cargo install --git https://github.com/dam4rus/gotl.git --locked
```
## Usage
The application uses vim keybindings for navigation:
- __j__/__k__/__down__/__up__: Navigate up and down
- __g__/__home__: Move to top
- __G__/__end__: Move to bottom
- __ctrl+f__/__page down__: Move one page down
- __ctrl+b__/__page up__: Move one page up
- __ctrl+d__: Move half page down
- __ctrl+u__: Move half page up
- __esc__/__q__: Close current screen (quit when last screen is closed)
### Tests screen

The first screen shown after test runs are finished are the tests screen. It groups tests by packages.
The circles indicates the result of the given package or test case:
- Gray circle: Test is skipped
- Green filled circle: Test has passed
- Red filled circle: Test has failed
By default all test packages and cases are visible. The visibility of test cases can be switched on and off by
test result categories:
- __S__: Toggle skipped test visibility
- __P__: Toggle passed test visibility
- __F__: Toggle failed test visibility
The bar at the bottom shows how many tests are passed, failed or skipped and whether they are visible or not.
On startup only test packages are visible. To see the test cases of a package, it has to be selected and expanded
with either the __l__ or __right__ key. __h__ or __left__ key can be used to collapse packages.
The __enter__ key will switch to the [log screens](#log-screen) for the selected test package or case.
To search for specific test package or case by name, the */* key switches to search mode where search term
can be given. Pressing __enter__ memos the search term and the __p__ and __n__ key can be used to go to the previous and next
occurence respectively. Pressing __esc__ in search mode clears this memo.
Tests can be run again by pressing the __ctrl+r__ key.
### Log screen

This is where logs can be read for a given test package or case. If structured logging is used in JSON format
pressing __enter__ will show the [details screen](#details-screen) for the given line. This let's you inspect
the JSON value. When the log line is plain text the [details screen](#details-screen) will just show the line
wrapped.
### Details screen

This screen let's you investigate JSON formatted log lines. When the current value is an object or array
__j__/__down__ and __k__/__up__ can be used to select properties/items and the __enter__ key can be used to dive into
the selected value. Pressing __q__/__esc__ will return to the previous screen.