No test coverage when tests are in a different package
问题 I have integration tests which are located in a separate directory. Those tests run my http server in the same process via net/http/httptest. My tests run but I get no coverage. Here is a very simplified example not using http for brevity. Directory layout: $GOPATH/src/go-test hello hello.go itest integration_test.go hello.go package hello func Hello() string { return "hello" } integration_test.go package itest import ( "go-test/hello" "testing" ) func TestHello(t *testing.T) { s := hello