Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/axw/gocov
Coverage testing tool for The Go Programming Language
https://github.com/axw/gocov
Last synced: about 1 month ago
JSON representation
Coverage testing tool for The Go Programming Language
- Host: GitHub
- URL: https://github.com/axw/gocov
- Owner: axw
- License: other
- Created: 2012-06-29T12:10:43.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2023-03-24T11:41:40.000Z (over 1 year ago)
- Last Synced: 2024-08-03T17:18:54.822Z (4 months ago)
- Language: Go
- Size: 157 KB
- Stars: 866
- Watchers: 20
- Forks: 97
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- go-awesome - gocov - test coverage (Open source library / Test)
README
# gocov
Coverage reporting tool for The Go Programming Language
[![Build Status](https://travis-ci.org/axw/gocov.svg?branch=master)](https://travis-ci.org/axw/gocov)
## Installation
```go install github.com/axw/gocov/gocov@latest```
## Usage
There are currently four gocov commands: ```test```, ```convert```, ```report``` and ```annotate```.
#### gocov test
Running `gocov test [args...]` will run `go test [args...]` with
an implicit `-coverprofile` added, and then output the result of
`gocov convert` with the profile.#### gocov convert
Running `gocov convert ` will convert a coverage
profile generated by `go tool cover` to gocov's JSON interchange
format. For example:go test -coverprofile=c.out
gocov convert c.out | gocov annotate -#### gocov report
Running `gocov report ` will generate a textual
report from the coverage data output by `gocov convert`. It is
assumed that the source code has not changed in between.Output from ```gocov test``` is printed to stdout so users can
pipe the output to ```gocov report``` to view a summary of the test
coverage, for example: -gocov test | gocov report
#### gocov annotate
Running `gocov annotate `
will generate a source listing of the specified function, annotating
it with coverage information, such as which lines have been missed.## Related tools and services
[GoCovGUI](http://github.com/nsf/gocovgui/):
A simple GUI wrapper for the gocov coverage analysis tool.[gocov-html](https://github.com/matm/gocov-html):
A simple helper tool for generating HTML output from gocov.[gocov-xml](https://github.com/AlekSi/gocov-xml):
A simple helper tool for generating XML output in Cobertura format for CIs like Jenkins and others from gocov.