Smarty

HTML coverage reports with GoConvey

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

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.
rss feed iconSubscribe Now
Read our recent posts
Marrying accelerated insurance claims with address data
Arrow Icon
Remember that phrase we all used in middle school, “Well if you love it so much, why don’t you marry it?” Well, we couldn’t agree more. Address data and insurance claims have been partners in an ever-evolving landscape of technology and property for years. Insurance claims rely on geocoding to find the exact location, and property data is used to assess the property's condition and attached amenities before losses. Efficiently deploying adjusters and accurately assessing damage is impossible without accurate address data.
An interview with Smarty’s experts on the new Excel plugin
Arrow Icon
We had a sit-down with Smarty crew members, Caroline Roten, Associate Product Manager, and Landon Fackrell, Software Engineer, and delved into Smarty's innovative new Excel plugin. This powerful tool makes address validation easier than ever, allowing users to clean and verify their address data directly within Excel. With a focus on simplicity and efficiency, Caroline and Landon talked about the features and benefits of the plugin, demonstrating how it can save time and enhance data accuracy without any need for coding.
Streamlining policy issuance with accurate address data
Arrow Icon
Insurance customers expect quick and customized service and immediate responses in their interactions. Smartphones, online transactions, and digital communications rule the world. Yet, the policy issuance for insurance can be extremely slow and painful. This is due primarily to the fact that accuracy matters so much regarding customer data, and this data takes a while to curate and process. So, how do insurers streamline claims processing while maintaining the highest accuracy levels?Speed and ease go togetherThe quick answer is "automation and digitization.