golcov

command module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2017 License: MIT Imports: 7 Imported by: 0

README

Golang Coverage

Golang provides great tools for unit tests, and capturing as well as displaying coverage information.

With the advent of specialized tools to display those statistics as well as tracking them by branch and over time, golcov closes the gap between lcov-server and golang.

To use it, grab the latest release for your platform, or install the master HEAD with go get:

go get github.com/makii42/golcov

As part of your CI Job, run your golang tests like this:

golcov test $(go list ./...) | lcov-server --upload https://${YOUR_LCOV_SERVER}>/

This should take of uploading your coverage information.

What it does

golcov runs go test under the hood, storing the coverage information in temporary files. Due to limitations in go test we have to run tests per package, as storing detailled information using the -coverprofile does not work for multiple packages at once.

If all tests are successful, the coverage information files are written to os.Stdout, where lcov-server can pick it up.

If tests in one package fail, the test output is written to os.Stderr, so you can see the actual failure.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL