Expand description
The Forge test runner.
Structsยง
- Contract
Runner - A type that executes all tests of a contract
- Contract
Runner ๐Context - Function
Runner ๐ - Executes a single test function, returning a
TestResult. - Fuzz
Branch ๐Frontier Artifact - Fuzz
Branch ๐Frontier Operands - Fuzz
Branch ๐Frontier Record - Fuzz
Branch ๐Frontier Site - Invariant
Campaign ๐Scope - Invariant
Campaign ๐Selection - Invariant
Persisted ๐Failure - Holds data about a persisted invariant failure.
- Replayed
Invariant ๐Sequence - A replayed and shrunk invariant counterexample.
- Sequence
Artifact ๐Spec - Metadata for the symbolic artifact persisted with a replayed invariant sequence.
- Sequence
Replay ๐ - A stateful call sequence replay target shared by symbolic minimization and failure checks.
- Symbolic
Handler ๐Replay Storage - Symbolic storage assignments that only apply when replaying the exact recorded sequence.
Constantsยง
- FUZZ_
BRANCH_ ๐FRONTIER_ FILE - FUZZ_
BRANCH_ ๐FRONTIER_ SCHEMA - STATEFUL_
FUZZ_ ๐BRANCH_ FRONTIER_ SCHEMA
Functionsยง
- base_
counterexample_ ๐to_ tx - base_
counterexamples ๐ - Converts campaign transactions into displayable counterexample calls.
- base_
counterexamples_ ๐to_ txes - Converts a persisted counterexample to
BasicTxDetails, settingshow_solidityin place. - comparison_
result ๐ - contract_
short_ ๐name - Returns the contract name without the file path prefix.
- corpus_
has_ ๐entries - Returns whether any canonical replay directory under
dirholds a corpus entry. - count_
runnable_ ๐invariant_ campaign_ anchors - effective_
test_ ๐function_ kind - failed_
invariant_ ๐calls - Returns the failing call sequence of a replayable invariant error.
- frontier_
comparison_ ๐flipped - frontier_
filter_ ๐display - frontier_
selector ๐ - function_
matches_ ๐network_ pass - fuzz_
test_ ๐path_ name - Returns a stable path component that distinguishes overloaded fuzz tests.
- fuzzer_
with_ ๐cases - inline_
config_ ๐for - invariant_
corpus_ ๐dir - Returns the corpus directory of a shared contract campaign or an isolated campaign.
- invariant_
failure_ ๐file - Returns the current invariant failure cache path.
- invariant_
frontier_ ๐dir - Returns the collision-free directory for one stateful frontier campaign.
- invariant_
handler_ ๐failure_ name - invariant_
suite_ ๐configs_ match - invariant_
suite_ ๐paths - Sets the invariant corpus directory and returns the contract-level failure directory.
- legacy_
fuzz_ ๐corpus_ dir - Returns the legacy unqualified corpus when the qualified corpus has no entries.
- narrow_
generated_ ๐corpus_ root - Narrows a generated corpus root to the per-test directory when it exists.
- parse_
frontier_ ๐selectors - persisted_
call_ ๐sequence - Helper function to load failed call sequence from file. Ignores failure if generated with different invariant settings than the current ones.
- persisted_
invariant_ ๐failure - Loads a persisted invariant failure from the new cache path, falling back to the legacy path.
- record_
handler_ ๐failure - Persists a handler-side assertion bug with symbolic replay storage.
- record_
invariant_ ๐failure - Persists an invariant failure, with any symbolic replay storage and confirmed failure site.
- replay_
fuzz_ ๐minimize - Replays one corpus-minimization candidate and records its coverage observation.
- same_
sequence_ ๐failure - Returns
trueif two sequence replays failed in the same way at the same site. - sample_
stateful_ ๐frontiers - sanitize_
symbolic_ ๐artifact_ component - select_
context_ ๐diverse_ frontiers - select_
invariant_ ๐campaigns - select_
stateful_ ๐frontiers - should_
symbolically_ ๐import_ fuzz_ corpus - stable_
hashed_ ๐component - symbolic_
artifact_ ๐file_ name - symbolic_
invariant_ ๐counterexample_ calls - symbolic_
invariant_ ๐unsupported_ domain_ reason - test_
paths ๐ - Helper function to set test corpus dir and to compose persisted failure paths.
- warn_
unimported_ ๐frontiers - Warns about requested frontier
labels that the frontier file atpathdid not provide.
Type Aliasesยง
- Handler
Failure ๐Map - Persisted handler-side assertion bugs keyed by
(reverter, selector). - Symbolic
Handler ๐Storage Map - Symbolic replay storage for handler bugs keyed by
(reverter, selector, fingerprint).