- Run all test
- Test Specific package
- Run tests in current and decendent directory
- Generate verbose output
- Run only tests matching
- Generate Test Coverage
- Generatge test cover profile to find exact functions missing test coverage.
go test -coverprofile cover.out
go tool cover -func cover.out
go tool cover -html cover.out
go test -coverprofile count.out -covermode count
go tool cover -html cover.out
- Benchmark testing including other test
go test -bench .
go test -bench . -benchtime 10s
- Profile testing - block, cover, cpu, mem, mutex
go test -bench . -benchmem
go test -bench SHA1 -benchmem
go test -trace {trace.out}
go test -{type}profile {file}
go test -bench Alloc -memprofile profile.out
## install choco install graphviz for graph
go tool pprof profile.out
type help to more info. like run svg