Git Product home page Git Product logo

gocov's Introduction

gocov

Coverage reporting tool for The Go Programming Language

Build Status

Installation

go get github.com/axw/gocov/gocov

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 <coverprofile> 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 <coverage.json> 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 <coverage.json> <package[.receiver].function> 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: A simple GUI wrapper for the gocov coverage analysis tool.

gocov-html: A simple helper tool for generating HTML output from gocov.

gocov-xml: A simple helper tool for generating XML output in Cobertura format for CIs like Jenkins and others from gocov.

gocov's People

Contributors

aleksi avatar appleboy avatar axw avatar azr avatar cwndrws avatar davecheney avatar djhworld avatar fabiofalci avatar georgeseif avatar gward avatar hpeduartepe avatar khlieng avatar maruel avatar mattn avatar mewmew avatar pjvds avatar t-yuki avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.