CASE 01 · PROGRAM EXECUTION
Test a compiled instruction repeatedly
You have built SBF bytes and need to check an account-constraint failure and an unchanged account. You do not need RPC methods or a live cluster.
INTERMEDIATE · ANCHOR TESTING · FREE
A green test only supports the behavior its fixture and runtime actually observed. Match each goal to the smallest harness that includes the boundary you need to check.
CASE 01 · PROGRAM EXECUTION
You have built SBF bytes and need to check an account-constraint failure and an unchanged account. You do not need RPC methods or a live cluster.
CASE 02 · RPC AND VALIDATOR
Your integration test needs the configured local cluster to answer RPC calls and run a transaction through validator behavior. A mock response is not sufficient.
CASE 03 · RUST INSTRUCTION
You want to execute a single instruction against an explicit list of account states and assert the result and post-state. You do not need AccountsDB or validator behavior.
CASE 04 · STATEFUL INVARIANT
You need coverage-guided sequences of deposits, releases, and refunds, checking after every action that withdrawals never exceed deposits. A failure should be replayable and shrinkable.
CASE 05 · CLIENT RESPONSE
Your application must display safe, honest states for slow, missing, or invalid RPC responses. This test is about client behavior, not the program's account checks.
--validator legacy selects solana-test-validator.