In the thrilling conclusion to our fuzz testing series, we’ll use Go’s fuzzer to find a real bug in our code, and also to verify the fix.
All tagged fuzzing
In the thrilling conclusion to our fuzz testing series, we’ll use Go’s fuzzer to find a real bug in our code, and also to verify the fix.
Let’s continue our exploration of fuzz testing in Go with a look at how to write a fuzz target for a (nearly) realistic function. This time we’ll try to detect a common kind of bug involving a confusion between runes and bytes.
Fuzz testing is Go’s clever way of generating new test inputs that you didn’t think of—and that may flush out some hidden bugs. Stand by for things to get a little fuzzy!
Choosing good test cases for our Go programs can be a bit hit-and-miss. What if we could automate that process? Let’s talk about randomisation, property-based testing, and Go’s built-in fuzz testing feature.