Test Coverage with Integration Tests in go
Basics go test tests packages as it is stated below.
> go test -h test [build/test flags] [packages] [build/test flags & test binary flags] So given a package, go test runs both in package tests and outside package tests.
> go test github.com/haibin/coverage/person ok github.com/haibin/coverage/person 0.007s To list in package tests, run the following.
> go list -f '{{.TestGoFiles}}' github.com/haibin/coverage/person [foo_test.go] To list outside package tests, run the following.
[Read More]