github.com/LawrenceWoodman/roveralls@v0.0.0-20171119193843-51b78509b607/doc.go (about) 1 /* 2 A recursive coverage testing tool. 3 4 roveralls runs coverage tests on a package and all its sub-packages. The coverage profile is output as a single file called 'roveralls.coverprofile' for use by tools such as goveralls. 5 6 This tool was inspired by https://github.com/go-playground/overalls written by Dean Karn, but I found it difficult to test and brittle so I decided to rewrite it from scratch. Thanks for the inspiration Dean. 7 8 Usage 9 10 At its simplest, to test the current package and sub-packages and create a 'roveralls.coverprofile' file in the directory that you run the command: 11 12 roveralls 13 14 To see the help for the command: 15 16 roveralls -help 17 18 roveralls runs coverage tests on a package and all its sub-packages. The 19 coverage profile is output as a single file called 'roveralls.coverprofile' 20 for use by tools such as goveralls. 21 22 Usage of roveralls: 23 -covermode count,set,atomic 24 Mode to run when testing files: count,set,atomic (default "count") 25 -help 26 Display this help 27 -ignore dir1,dir2,... 28 Comma separated list of directory names to ignore: dir1,dir2,... (default ".git,vendor") 29 -short 30 Tell long-running tests to shorten their run time 31 -v Verbose output 32 33 View Output in a Web Browser 34 35 To view the code coverage for you package in a browser: 36 37 go tool cover -html=roveralls.coverprofile 38 39 Use with goveralls 40 41 The output of roveralls is the same as the the standard: 42 go test -coverprofile=profile.coverprofile 43 but with multiple files tested in the output file. This can therefore be used with tools such as goveralls. 44 45 If you wanted to call it from a '.travis.yml' script you could use: 46 47 - $HOME/gopath/bin/roveralls 48 - $HOME/gopath/bin/goveralls -coverprofile=roveralls.coverprofile -service=travis-ci 49 */ 50 package main