Skip to content

`go test` that fails on uncovered lines and shows them

Notifications You must be signed in to change notification settings

mhratson/go-testcov

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-testcov Build Status coverage

go test that fails on uncovered lines and shows them

  • 🎉 Instant, actionable feedback on 💚 test run
  • 🎉 Onboard legacy code with // untested sections: 5 comment
  • 🎉 Mark uncovered code sections with inline // untested section comment
  • 🚫 PRs with bad test coverage
  • 🚫 External/paid coverage tools
go get github.com/grosser/go-testcov
go-testcov
...
test output
...
pkg.go new uncovered sections introduced (1 current vs 0 configured)
pkg.go:20.14,21.11
pkg.go:54.5,56.5

Notes

  • coverage in go
  • Runtime overhead of is about 3%
  • Use -covermode atomic when testing parallel algorithms
  • Needs go 1.8+

Development

Run go-testcov on itself:

go install
go-testcov

Author

Michael Grosser
michael@grosser.it
License: MIT

About

`go test` that fails on uncovered lines and shows them

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%