Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

gotestsum

$ gotestsum Community Low Risk
gotestyourself · Code & DevOps · Apache-2.0 · macos / linux / windows

gotestsum wraps go test -json to deliver readable terminal summaries, automatic failure reruns via --rerun-fails, and machine-readable artifacts via --jsonfile and --junitfile. Non-interactive execution and clear exit codes make it ideal for coding agents verifying Go changes.

FCRS-1.0 Score
86 /100
Good
Medium Confidence
Zero-Friction Install
brew install gotestsum
CLI vs MCP Decision CLI Only

Local Go test runner tightly coupled to your repo and go toolchain; agents run gotestsum directly in the workspace.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
✓ NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 22 / 25

Supports --format standard-json, --jsonfile, --junitfile, NO_COLOR, and non-interactive exit codes, though --watch must be avoided by agents.

  • Structured --format standard-json and --jsonfile output
  • Compact --format pkgname-and-test-fails reduces log noise
Trust & Safety 22 / 25

Zero credentials or remote writes; executes local go test code and only writes report files when --junitfile or --jsonfile is passed.

  • No auth required; strictly local workspace execution
Setup & Portability 14 / 15

Single static Go binary available via brew install gotestsum and go install across macOS, Linux, and Windows.

  • Cross-platform binary with Homebrew and Go module install
Utility & Efficiency 13 / 15

Improves heavily over raw go test with failure-only summaries, --rerun-fails for flaky tests, and JUnit/JSON artifact generation.

  • Built-in --rerun-fails and JUnit/JSON reporters
Maintenance & Lineage 8 / 10

Well-maintained community Go tool (gotestyourself/gotestsum) under the Apache-2.0 license.

  • Widely adopted in Go CI pipelines
Docs & Verifiability 7 / 10

Clear --help output and concise README documentation covering formatters and flags.

  • Self-contained --help flag reference

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

No credentials required; runs local Go test suites using the local go toolchain.

Side Effects
Read-Only Local Write
Cost & Quotas

Apache-2.0 open-source CLI; completely free.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# gotestsum Agent Rules
- Prefer `--format pkgname-and-test-fails` or `--format standard-json` with `NO_COLOR=1`.
- Avoid `--watch` mode inside non-interactive agent loops.
- Pass explicit package targets after `--` when scoping fast test runs.

Agent-Ready Command Recipes

Safe Read-Only Queries

Run Go tests with JSON event stream
gotestsum --format standard-json -- ./...

Streams go test -json events for structured parsing without writing report files.

Run concise package summary without color
NO_COLOR=1 gotestsum --format pkgname-and-test-fails -- ./...

Emits compact per-package status and only failing test details to preserve agent context.

Controlled Writes & Previews

Run tests and write JUnit and JSON artifacts
gotestsum --format dots --junitfile reports/junit.xml --jsonfile reports/events.json -- ./...

Persists structured JUnit XML and JSON test event logs under reports/ for downstream inspection.

Strengths for Agents

  • + --format pkgname-and-test-fails keeps failing test output compact for LLM context windows.
  • + Outputs both go test -json streams (--jsonfile) and CI-ready --junitfile XML.
  • + Supports --rerun-fails to isolate flaky tests automatically.

Caveats & Pitfalls

  • ! Interactive --watch mode blocks until terminated and must not be used in headless runs.
  • ! Requires a working local go toolchain matching the project's go.mod.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI