# Go test coverage: go test -cover vs Supercov > Compare go test -cover's statement coverage with Supercov's branch, MC/DC, per-test and assertion coverage for Go, with a condition every statement misses. Web page: https://supercov.com/compare/go-test-coverage · Published 2026-09-25 All Supercov pages for agents: https://supercov.com/llms.txt · Full text: https://supercov.com/llms-full.txt ## go test -cover vs Supercov Start with `go test -cover`. It is built into the Go toolchain, needs no dependency, and tells you which statements ran. Supercov runs the same `go test` command and adds branches, independent conditions, coverage per test and which statements your assertions check. | Feature | go test -cover 1.27.1 | Supercov 2.0.0 | |---|---|---| | Code quality scoring | × Not built in | ✓ Supported | | Security review | × Not built in | ✓ Supported | | Line coverage | ✓ Supported | ✓ Supported | | Branch coverage | × Not built in | ✓ Supported | | MC/DC | × Not built in | ✓ Supported | | Per-test coverage | × Not built in | ✓ Supported | | Assertion coverage | × Not built in | ✓ Supported | | Reports | ✓ Supported | ✓ Supported | Standard coverage workflows in the versions shown; custom plugins are outside this table. Supercov requires Go 1.22 or newer and runs your own `go test` command against an instrumented copy of the module. The Go toolchain counts statements per run. A test that calls t.Parallel() shares one counter array with the tests beside it, so Supercov counts that coverage run-wide rather than naming a test for it. Per-test coverage means individual tests, not just test files. Supercov needs a supported runner. Assertion coverage links source to checked properties through agent review; it is not a mutation score or a correctness guarantee. ## go test -cover: statements, one profile per run ```sh go test -cover ./... go test -coverprofile=cover.out ./... go tool cover -html=cover.out ``` The unit is the statement. In the default mode the question is, in the Go documentation's words, ["does this statement run?"](https://pkg.go.dev/cmd/go#hdr-Testing_flags); `-covermode=count` counts how many times, and `-race` switches the default to `atomic`. `-coverpkg` widens coverage beyond the package under test. The profile covers the whole run. It does not say which test ran a statement, and it has no notion of a branch outcome: both sides of an `if` are just the statements inside them. The [Go blog's coverage article](https://go.dev/blog/cover) explains the design. ## What MC/DC adds to a Go test ```go func CanAccess(signedIn, expired bool) bool { if signedIn && !expired { return true } return false } func TestAccess(t *testing.T) { if !CanAccess(true, false) { t.Fatal("active session denied") } if CanAccess(false, false) { t.Fatal("signed-out visitor allowed") } } ``` Every statement runs, so `go test -cover` reports 100%. Yet no test has a signed-in user with an expired session, so nothing shows that expiry can deny access on its own. Add `CanAccess(true, true)` to cover it. This is an illustrative example, not a published cross-tool Go measurement. ## Where Supercov fits With Go 1.22 or newer, run your own test command through Supercov: ```sh go run github.com/supercorp-ai/supercov/cmd/supercov@latest -- go test ./... go run github.com/supercorp-ai/supercov/cmd/supercov@latest runs latest gaps ``` It instruments a copy of the module, so your source tree is unchanged, and it reports the missing condition above by name. The [Go guide](https://supercov.com/docs/go.md) has the setup and a runnable example; [runner support](https://supercov.com/docs/supported-suites?language=go) covers parallel tests and the other limits. Keep `go test -cover` when a statement percentage answers your question. Use Supercov when you, or your coding agent, need to know which conditions and checks are missing, and which test would close the gap. Neither score proves the program correct. ## Feature sources - [go test -cover: Testing flags and cover modes](https://pkg.go.dev/cmd/go#hdr-Testing_flags) - [go test -cover: Coverage profiling](https://go.dev/blog/cover) - [go test -cover: HTML view](https://pkg.go.dev/cmd/cover) - [Supercov: Coverage model](https://github.com/supercorp-ai/supercov/blob/v2.0.0/docs/coverage-model.md) - [Supercov: Supported runners](https://github.com/supercorp-ai/supercov/blob/v2.0.0/docs/supported-suites.md) - [Supercov: Assertion coverage](https://github.com/supercorp-ai/supercov/blob/v2.0.0/docs/assertions.md) - [Supercov: Code quality](https://github.com/supercorp-ai/supercov/blob/v2.0.0/docs/quality.md) - [Supercov: Security](https://github.com/supercorp-ai/supercov/blob/v2.0.0/docs/security.md) - [Supercov: Reports](https://github.com/supercorp-ai/supercov/blob/v2.0.0/docs/reports.md) - [Supercov: CLI reference](https://github.com/supercorp-ai/supercov/blob/v2.0.0/docs/cli.md)