logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Go Test - Test Go Packages | Online Free DevTools by Hexmos

Test Go packages easily with Go Test. Execute unit tests, run benchmarks, and analyze code coverage for your Go projects. Free online tool, no registration required.

go-test

Tests Go packages (files have to end with _test.go). More information: https://pkg.go.dev/cmd/go#hdr-Testing_flags.

  • Test the package found in the current directory:

go test

  • [v]erbosely test the package in the current directory:

go test -v

  • Test the packages in the current directory and all subdirectories (note the ...):

go test -v ./...

  • Test the package in the current directory and run all benchmarks:

go test -v -bench .

  • Test the package in the current directory and run all benchmarks for 50 seconds:

go test -v -bench . -benchtime {{50s}}

  • Test the package with coverage analysis:

go test -cover

See Also