A developer-friendly test runner for Go with coverage, filtering, and clean output.
Official repository (canonical source): https://github.com/entiqon/gotestx
Caution
OFFICIAL INSTALLATION ONLY Please ensure you are using the official Entiqon/GoTestX repository. Never download binaries from untrusted forks. Use only the official releases.
gotestx [flags] [packages]If no packages are provided, GoTestX defaults to:
./...
| Flag | Description |
|---|---|
-c, --with-coverage |
Enable coverage profile generation (coverage.out) |
-o, --open-coverage |
Open coverage report (macOS only, implies -c) |
-q, --quiet |
Suppress verbose output (summary only) |
-V, --clean-view |
Hide [no test files] lines |
-I, --ignore-pattern |
Exclude packages using tree-based patterns |
-h, --help |
Show help |
-v, --version |
Show version |
- Packages are resolved using
go list - If no packages are provided →
./...is used - Invalid paths fail fast
Packages can be excluded using:
- CLI flags:
-I <pattern> .gotestxignorefile
Patterns follow tree-based matching:
| Pattern | Meaning |
|---|---|
mock |
matches any segment named mock |
outport/testkit |
matches exact subpath |
- Matching is segment-based
- Not substring-based
- Not glob-based
go list ./...
↓
load .gotestxignore
↓
merge CLI patterns
↓
filter packages
↓
go test
- Applied after package discovery
- Matching packages are removed before execution
- If all packages are excluded:
No packages to test after applying ignore rules.gotestxRunning tests...
ok pkg/a
ok pkg/b
gotestx -cRunning tests with coverage...
ok pkg/a
ok pkg/b
Coverage: coverage.out
gotestx -qTests finished successfully
gotestx -VRemoves lines like:
? pkg [no test files]
gotestx
gotestx -c
gotestx -cq
gotestx -I mock ./...
gotestx -I mock -I testkit ./...--open-coverageis supported only on macOS- Flags can be combined (e.g.
-cq,-co)