Go testing
go.dev
What it is
Go testing is the testing toolkit built into Go, an open-source programming language supported by Google. Developers run it with the `go test` command and `testing` package. It discovers test functions named `TestXXX` in files ending in `_test.go`; adding `-v` displays tests and their results. The standard toolchain also supports native fuzzing, which varies inputs to help find bugs, as well as benchmarking and profiling. The race detector can be enabled with `go test -race`, though it detects races only in code paths exercised during a run. For vulnerability checks, `govulncheck` identifies known issues affecting code and prioritizes them according to whether vulnerable functions or methods are called. Its JSON output can feed CI/CD systems, and the Go team provides a GitHub Action. Go is free and has releases for Linux, macOS, and Windows, along with source archives and other ports. Its cryptography libraries can be used in FIPS 140-3 compliant mode. The language is used for cloud and network services, command-line interfaces, web development, DevOps, and site reliability engineering.
Spec sheet
- What it does
- Go is an open-source programming language supported by Google for building simple, secure, scalable systems.Read 7 Oct 2026 · go.dev
- Founded
- 2009Read 28 Sep 2026 · go.dev
- Benchmarks and profiling
- The Go project describes its tooling as including built-in testing, benchmarking, and profiling frameworks.Read 7 Oct 2026 · go.dev
- CI integration
- The Go team provides a GitHub Action for govulncheck, and govulncheck's JSON output can support integration with other CI/CD systems.Read 7 Oct 2026 · go.dev
- Cryptography compliance
- Go's cryptography libraries can be used in FIPS 140-3 compliant mode for regulated environments.Read 7 Oct 2026 · go.dev
- Download platforms
- The downloads page lists releases for Windows, macOS, and Linux, along with source archives and other ports.Read 7 Oct 2026 · go.dev
- Fuzzing
- Go's standard toolchain supports native fuzzing, which continuously manipulates program inputs to find bugs.Read 7 Oct 2026 · go.dev
- Help and support
- The Go site directs users to community help on Stack Overflow and the Gophers Slack, and to the Go issue tracker for bugs.Read 7 Oct 2026 · go.dev
- Race detection
- Go includes a race detector that can be enabled for tests with `go test -race`, but it only finds races in code paths that run.Read 7 Oct 2026 · go.dev
- Security updates
- The Go team issues security fixes for the two most recent major releases.Read 7 Oct 2026 · go.dev
- Test discovery
- The test framework runs test functions named `TestXXX` in files ending in `_test.go`.Read 7 Oct 2026 · go.dev
- Testing framework
- Go has a lightweight test framework built from the `go test` command and the `testing` package.Read 7 Oct 2026 · go.dev
- Use cases
- The Go site describes use for cloud and network services, command-line interfaces, web development, DevOps, and site reliability engineering.Read 7 Oct 2026 · go.dev
- Verbose test output
- Running `go test -v` lists the tests and their results.Read 7 Oct 2026 · go.dev
- Vulnerability scanning
- The `govulncheck` tool identifies known vulnerabilities that affect code and prioritizes findings based on whether vulnerable functions or methods are called.Read 7 Oct 2026 · go.dev
Plans and prices
Strong points and limits
Strong points
- Free and open source
- Built-in tests, fuzzing, benchmarking, and profiling
- Includes a race detector
- govulncheck can integrate with CI/CD
- Releases for Linux, macOS, and Windows
Limits
- Race detection covers only code paths that run
- Security fixes target the two most recent major releases
Who it suits
It suits Go developers who want built-in tests, fuzzing, benchmarks, profiling, and race detection in their development workflow. Teams can also use govulncheck with CI/CD systems.
Verdict
Go's standard tooling covers several testing and security tasks without a separate testing product. Remember that race detection is limited to paths exercised during tests.
Where Specifiction places it
- Unit Testing#8 of 328.0
- Unit Testing Frameworks#9 of 328.1