covercmp

command module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2020 License: MIT Imports: 6 Imported by: 0

README

covercmp

The covercmp command displays code coverage changes between unit tests. This plugin is heavily inspired by benchcmp

This tool is the first piece I needed in a larger project to support free code coverage in CI/CD especially because companies are looking to cut costs due to COVID-19

Usage

To measure the coverage impact of a change, use 'go test' to run coverage before and after the change:

go test -count=1 -cover > before.txt
# make changes
go test -count=1 -cover > after.txt

Then feed the coverage results to covercmp:

covercmp go before.txt after.txt

Covercmp will summarize and display the coverage changes, in a format like this:

package            before cov     after cov     delta
compress/bzip2     87.5%          97.5%         10.0%
compress/flate     82.7%          93.8%         11.1%
compress/gzip      89.9%          89.9%         0.0%
compress/lzw       87.2%          87.2%         0.0%
compress/zlib      84.7%          84.7%         0.0%

Installation

  • Download the latest binary for your OS release from the releases page
  • Rename the file to covercmp
  • Make the file executable (chmod +x covercmp)
  • Checkout the help menu for usage instructions covercmp help
  • (Optional Step) Move it to a folder in your PATH variable. (mv covercmp /bin)

Supported Languages

Contribute

  1. Pull requests are welcome
  2. The API is open enough to support other Languages. See Golang driver implementation for more details

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