Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alex-parra/gotestiful
gotestiful - gotest + beautiful
https://github.com/alex-parra/gotestiful
coverage go test
Last synced: about 1 month ago
JSON representation
gotestiful - gotest + beautiful
- Host: GitHub
- URL: https://github.com/alex-parra/gotestiful
- Owner: alex-parra
- License: mit
- Created: 2023-01-12T18:48:41.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-09T09:24:04.000Z (almost 2 years ago)
- Last Synced: 2024-06-19T11:16:40.823Z (6 months ago)
- Topics: coverage, go, test
- Language: Go
- Homepage: https://github.com/alex-parra/gotestiful
- Size: 63.5 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gotestiful
> gotest + beatiful
`gotestiful` is a go terminal program that wraps 'go test' to streamline tests running and config and also improves the coverage presentation output.
## Quick start
1. run `go install github.com/alex-parra/gotestiful@latest`
2. run `gotestiful` from the root of any go project (where go.mod is)---
Comparison of `go test` and `gotestiful` on [kubernetes/client-go](https://github.com/kubernetes/client-go)
![kubernetes-client-go](https://drive.google.com/uc?export=view&id=1ZIFj6loyNTGxEUKVWwlE6sslh5CIgdd5)
## Examples
- `gotestiful` runs tests for the current folder eg. `go test ./...`
- `gotestiful -help` shows examples and flags infos
- `gotesttiful some/pkg` runs only that package eg. `go test some/pkg`
- `gotestiful -cache=false` runs tests without cache eg. `go test -count=1 ...`
- `gotestiful init` creates a base configuration in the current folder
(the config file is optional. you may opt to use flags only)
- ... see `gotestiful -help` for all flags## Features:
- **config file per project**
run `gotestiful init` from your project root to create a `.gotestiful` config file and then adjust the settings.
afterwards you only need to run `gotestiful` and the config is read- **exclusion list**
add packages (or just prefixes) to the config `exclude` array to not test those packages.
example: exclude generated code such as protobuf packages- **global coverage summary**
shows the overall code coverage calculated from the coverage score of each tested package.- **open html coverage detail report**
set the `-report` flag and the coverage html detail will open (eg. `go tool cover -html`)## Contributors
Made with [contributors-img](https://contrib.rocks).