Cloudflare

Go coverage with external tests

Jan 19, 2016Filippo Valsorda
Go coverage with external tests
SummaryAI, from the source post

This post introduces a technique for capturing Go test coverage data from end-to-end tests, which is not natively supported by the Go toolchain. It details a workaround involving a dummy test that executes the main function and compiles a binary with coverage enabled. The post also explains how to merge this coverage data with unit test coverage using `gocovmerge` for a more complete picture of code execution, specifically mentioning its application in the RRDNS project.

More from the Data Infrastructure & Analytics trail