Go Black Box Testing with Courage and Coverage
Test coverage is one of the essential metrics of codebase health and one of the most controversial. Coverage obtained from white-box tests may bring about unfound confidence if we rely heavily upon the use of fake objects (mocks, stubs, etc.). On the other hand, coverage information from end-to-end tests and benchmarks shows the real picture. But how can we calculate coverage when running a Go binary? Since Go 1.20, we have had the application coverage profiling feature. And, to demonstrate its power, I need just a few minutes!