Your tests pass, but do they work? Mutation testing in Go

Continuous Integration has become a standard practice in modern development, and Go provides a rich set of tools to support it: go vet, unit tests, benchmarks, and fuzz testing. Building a CI pipeline that maintains a baseline of quality is straightforward.
But how do we know we're writing good tests? A test that calls a function and discards the result still contributes to coverage. You can hit 100% coverage with zero assertions.

LEVEL: Intermediate

Place
Golab #1
Length
45 min
When
November 2nd, 2026
14:45

Abstract

Continuous Integration has become a standard practice in modern development, and Go provides a rich set of tools to support it: go vet, unit tests, benchmarks, and fuzz testing. Building a CI pipeline that maintains a baseline of quality is straightforward.
But how do we know we're writing good tests? A test that calls a function and discards the result still contributes to coverage. You can hit 100% coverage with zero assertions.

Mutation testing exposes this gap. It intentionally introduces small changes to your source code — flipping + to -, swapping == to !=, removing else branches — and runs your test suite against each mutant. If the tests fail, the mutant is "killed." If they still pass, the mutant "survived," revealing a real weakness.
The challenge is that mutation testing is slow. In this talk, I'll show how Go's -overlay flag enables safe, parallel mutation testing without modifying source files, and how to integrate it incrementally into CI — running only on changed code in a pull request.

GoLab is a conference made by Develer.
Develer is a company based in Campi Bisenzio, near Florence. Our motto is : "Technology to give life to your products". We produce hardware and software to create exceptional products and to improve industrial processes and people's well being.
In Develer we have passion for the new technologies and we offer our clients effective solutions that are also efficient, simple and safe for the end users. We also believe in a friendly and welcoming environment where anybody can give their contribution. This passion and this vision are what we've been driven to organize our conference "made by developers for developers".


Subscribe to our newsletter

We hate spam just as much as you do, which is why we promise to only send you relevant communications. We respect your privacy and will never share your information with third parties.
©2026 GoLab | The international conference on Go in Italy-Design & devCantiere Creativo-Made withDatoCMS