Fuzz Testing is a testing method that instead of writing test cases with a predefined mock data, you generate the test data dynamically and randomly to test if some property or invariant of the test unit is true.
For example, you want to test a
reverse function, which take a list and return the reversed copy of that list.
To test this with random data, we see that if
reverse works properly and returns a reversed copy of its input, so if we feed that result into the
reverse function again, we should get the original list. So the test should be:
(defun test_reverse (list) (= list (reverse (reverse (list)))))
By doing this, we see the few aspects of a fuzz test:
Apparently I am seeing this as a variant of Table Driven Test with the test table generated automatically, of course table driven test don't have shrinking feature.
How to navigate this notebook
Hey, in case you do not know, the navigation system of this notebook is inspired by Andy's Working notes . Although he didn't open source…
Welcome! Look like you've found my personal notebook. This is the place where you can take a peek into my mind to see what I've been…
If you think this note resonated, be it positive or negative, please feel free to send me an email and we can talk.