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 idea: if a project already has property-based tests, whether using proptest or quickcheck (or maybe something else?), it's useful to do fuzz testing with those APIs. That way, cargo test will still run quickly, while cargo fuzz will reuse all the same property-testing code, generators, etc., and run for as long as you want to see if it can find anything.
The text was updated successfully, but these errors were encountered:
I've kinda wanted this for a while, however there's an important thing to note: Arbitrary works differently from quickcheck and proptest because those operate on an unlimited pool of entropy, and Arbitrary operates on a limited byte string (and has to try and not introduce too much obfuscation). Without this, fuzzing will be very slow and ineffective.
That said, the opposite direction is less of a problem: We can probably write a wrapper that takes anything that implements Arbitrary and gives you something that implements quickcheck::Arbitrary, and maybe something similar for proptest.
It's also possible that you could reimplement the various macros used by proptest to generate "proptest-native" code vs. "libfuzzer-native" code at compile time, depending on your build target.
The idea: if a project already has property-based tests, whether using
proptest
orquickcheck
(or maybe something else?), it's useful to do fuzz testing with those APIs. That way,cargo test
will still run quickly, whilecargo fuzz
will reuse all the same property-testing code, generators, etc., and run for as long as you want to see if it can find anything.The text was updated successfully, but these errors were encountered: