New 42-day free trial Get it now
Smarty

HTML coverage reports with GoConvey

Smarty header pin graphic
Updated July 2, 2025
Tags
Smarty header pin graphic

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:

$GOPATH/src/github.com/smartystreets/goconvey/web/client/reports

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.
Read our recent posts
Verification update: Add provisional addresses to Smarty’s database
Arrow Icon
With the launch of our latest product feature, US Provisional Address Manual Process, US Address Verification users can now submit new or missing addresses, and we’ll verify them against authoritative databases and add any approved records to our database. Better yet, you won’t need to make any integration changes to see your addresses in your API results, it won’t take longer than 30–60 days, and it won’t cost you anything extra. That’s what we call an all-around win!Let us take the stress of verifying new or missing addresses off your plate so you can focus on what you do best.
Functional options pattern in Go: Flexibility that won’t make future-you sigh loudly
Arrow Icon
SDK authors live in a permanent tug-of-war:Users want a simple constructor they can paste and ship. Maintainers want room to grow without breaking everybody’s build on the next release. That second part matters a lot right now, because a lot of people are still relatively early in their software careers. Approximately one in three developers has coded professionally for four years or less. That matters because unclear or fragile APIs disproportionately hurt newer developers—they don’t have scars yet.
Ambiguous address matches: What they are and why compliance teams should care
Arrow Icon
If you’ve ever run into an address that seems to exist in more than one place, congratulations—you’ve discovered the world of ambiguous address matches. They’re the Schrödinger’s cat of location data: valid, yet potentially two distinct locations. This blog will focus on a few key things: What are ambiguous address matches?Why ambiguous address matches matter for compliance and customer serviceHow to handle matches with address ambiguityWhy you should inform your customers of ambiguous address matchesOur final thoughts on ambiguous address matchesWhat are ambiguous address matches?An ambiguous address match occurs when an entered address resolves to two or more valid locations with slight but meaningful differences.

Ready to get started?