Skip to main content

Module runner

Module runner 

Source
Expand description

The Forge test runner.

Structsยง

ContractRunner
A type that executes all tests of a contract
ContractRunnerContext ๐Ÿ”’
FunctionRunner ๐Ÿ”’
Executes a single test function, returning a TestResult.
FuzzBranchFrontierArtifact ๐Ÿ”’
FuzzBranchFrontierOperands ๐Ÿ”’
FuzzBranchFrontierRecord ๐Ÿ”’
FuzzBranchFrontierSite ๐Ÿ”’
InvariantCampaignScope ๐Ÿ”’
InvariantCampaignSelection ๐Ÿ”’
InvariantPersistedFailure ๐Ÿ”’
Holds data about a persisted invariant failure.
ReplayedInvariantSequence ๐Ÿ”’
A replayed and shrunk invariant counterexample.
SequenceArtifactSpec ๐Ÿ”’
Metadata for the symbolic artifact persisted with a replayed invariant sequence.
SequenceReplay ๐Ÿ”’
A stateful call sequence replay target shared by symbolic minimization and failure checks.
SymbolicHandlerReplayStorage ๐Ÿ”’
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, setting show_solidity in 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 dir holds 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 true if 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 at path did not provide.

Type Aliasesยง

HandlerFailureMap ๐Ÿ”’
Persisted handler-side assertion bugs keyed by (reverter, selector).
SymbolicHandlerStorageMap ๐Ÿ”’
Symbolic replay storage for handler bugs keyed by (reverter, selector, fingerprint).