Confluent
Confluent logoConfluent · Feature trail

Go Binary Code Coverage

1 post · Apr 2020

What this trail covers

This post introduces Bincover, an open-source tool developed by Confluent to measure code coverage for Go binaries, particularly for end-to-end and system tests. It addresses limitations of the built-in `go test` tool by enabling coverage measurement for binaries that execute `main()` and handle panics or `os.Exit()` calls. Bincover instruments binaries to collect coverage profiles, supports passing command-line arguments and environment variables, and merges profiles from multiple test runs. This capability is crucial for ensuring the robustness and testability of Go-based Confluent products like CLIs.

All Confluent trails