HTML Coverage Reports with GoConvey

February 18, 2014
For packages that pass all tests, coverage reports are generated and made available by clicking the package name.

You asked for it and now you've got it.

For packages that pass all tests, coverage reports are generated and made available by clicking the package name, which in that case becomes a link (provided you've cleared your browser's cache!).

Click the package name

Right now the coverage command that is run is something like this:

$ go test -covermode=set -coverprofile=<package_name>.txt

That command generates a plain text profile used in the following command:

$ go tool cover -html=<package_name>.txt -o <packge_name>.html

...which plunks down an html file which we can link to from the UI.

As you can see above, we use the 'set' covermode as it is more suited for concurrent scenarios and is the cheapest report to generate (thanks to Rob Pike for the advice on that one). We might support other values there if it's wanted (a phrase which here means comment below if you have strong feelings).

Here's what a bit of the report looks like (gradient of grey through green means covered, red means not covered):

Thanks to the go team for the go cover tool!

The coverage profiles and html files are stored at:


Out of the way but available to you if you have plans for them. There's lots you can do with coverage in GoLang. Happy testing!

PS - Brand new shiny UI coming soon to GoConvey... (as if it wasn't good enough already!)

Subscribe to our blog!
Learn more about RSS feeds here.
rss feed iconSubscribe Now
Read our recent posts
6 Ways Telecom & Internet Companies Leverage Address Data
Arrow Icon
In a recent webinar, we showed how address data tools help managers improve business performance in the following areas:Network PlanningAsset ManagementCustomer Acquisition and RetentionData BlendingMail and Parcel DeliveryFraud Reduction1. Network PlanningAccurate address data plays a critical role in overcoming network planning challenges. We presented solutions at each of the following steps in the network planning process:&nbsp;Clean existing address data with&nbsp;US Address VerificationKeep incoming data clean with&nbsp;US Address AutocompleteMap all addresses using our&nbsp;US Master Address List and hyper-accurate&nbsp;US Rooftop GeocodingAdd context to maps with&nbsp;enriched US Property DataAnalyze, get spatial insights, and make confident business decisions&nbsp;2.
A Fresh Start: Clean Out Your Computer Day
Arrow Icon
In a world where the lines between digital and physical spaces blur, the health of our computers has a massive impact on our productivity and overall ability to perform well at work. &nbsp;Clean Out Your Computer Day, observed on the second Monday of February, is the perfect opportunity to ensure that we declutter and optimize our virtual spaces. Just as we regularly clean our homes and offices, this day underscores the importance of maintaining a streamlined, efficient computer setup. The Digital Declutter: Where to StartStarting with the basics, sift through your files and programs.
Smarty's 2023 Address Data Deep Dive: Trends, Challenges, and Breakthroughs
Arrow Icon
We recently hosted a webinar where Brent Francom and Jeffrey Duncan, two of our Product Managers, talked about the lessons we learned and the improvements we've made in 2023. Here are the highlights. When you process so many addresses, you see things. We processed 327 billion+ addresses in 2023, equating to nearly 900 million per day or over 10,000 per second. When you process that many addresses, you find many funny and interesting ones. We keep a "Wall of Shame" with funny and malformed addresses that somehow validate.
Ready to get started?