You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the stdlib does not support structured fuzzing or fuzzing complex types (structs). We need a compatibility layer to cover that usage. In that PR I used https://github.com/google/gofuzz.
Gofuzz has full support for the stdlib fuzzing engine and the test looks like this:
funcFuzzError(f*testing.F) {
f.Fuzz(func(t*testing.T, data []byte) {
c:=complexStruct{}
fuzz.NewFromGoFuzz(data).NilChance(.1).NumElements(1, 10).MaxDepth(5).Fuzz(&c) // populate complex structfoo(&c) // run target method with fuzzed data
})
}
The stdlib is generating random data ([]byte) which are used as a seed to populate the complex struct (this is to make the tests reproducible).
Followup from #63
We should introduce fuzz testing to make sure we are not missing anything
As this is a library we might also evaluate adding fuzz testing into APM Server and fuzz the intake endpoint directly.
The text was updated successfully, but these errors were encountered: