Testing

Go Test

July 31, 2021
Go, Golang, Test, Testing

Go Test # Unit Test # Run # Run all unit tests # $ go test ./... Show detailed information $ go test ./... -v Disable test cache $ go test ./... -count=1 Run a method of a unit test # $ go test ./mypkg/ -run TestSample Coverage # Output coverage to a terminal $ go test -cover ./... Output the coverage profile to a file and view it in a browser ...