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
Traditional example-based testing falls short in covering the wide array of input combinations and edge cases:
each test executes once, with concrete input values. That is, unit test functions are public and without parameters.
As our ecosystem grow more sophisticated, the testing methods must evolve to identify vulnerabilities and ensure contract robustness:
at the very least, each test must be able to run multiple times with randomly generated concrete values (smaller values, à la property-based testing).
(From there, via Clarinet config/flag, you can tell to the underling data generator to be biased, and then you'll have turned your property-based tests to look more like fuzz tests—one of the reasons why foundry uses that terminology as well. 🔢)
To summarize:
type
prefix
arguments
semantics
concrete
test
no
single execution with concrete values (you are here)
property
test
yes
multiple executions with randomly generated concrete values (smaller values)
fuzz
test
yes
multiple executions with randomly generated concrete values (biased)
Traditional example-based testing falls short in covering the wide array of input combinations and edge cases:
As our ecosystem grow more sophisticated, the testing methods must evolve to identify vulnerabilities and ensure contract robustness:
(From there, via Clarinet config/flag, you can tell to the underling data generator to be biased, and then you'll have turned your property-based tests to look more like fuzz tests—one of the reasons why foundry uses that terminology as well. 🔢)
To summarize:
test
test
test
See also:
clarinet fuzz
command and heterogeneous test-suites hirosystems/clarinet#398The text was updated successfully, but these errors were encountered: