Skip to content

Instantly share code, notes, and snippets.

@MuthukumarHelios
Last active May 8, 2018 06:31
Show Gist options
  • Save MuthukumarHelios/8c47922077fce86108ad71a643a24bc3 to your computer and use it in GitHub Desktop.
Save MuthukumarHelios/8c47922077fce86108ad71a643a24bc3 to your computer and use it in GitHub Desktop.
GOlang Test Coverage Report
go get github.com/axw/gocov
go get github.com/matm/gocov-html
//Generate the Test All the Path's Are Fixed
gocov test >hey.json
//Using the Json Generate the Html
gocov-html hey.json >hey.html
>alternate Raw Method
go test -coverprofile=coverage.out
go tool cover -html=coverage.out
//Below Are the simple Test files
gocov-html hey.json >hey.html
gocov test > incomplete.json
gocov test incomplete.json
gocov test >nice.json
gocov-html nice.json > nice.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment