skip to content
< back
30 oct 2025

testing solana programs via litesvm

traditional `anchor test` runs are slow because they spin up a local validator and communicate via rpc. litesvm changes this by providing a lightweight, in-memory solana vm that runs directly in rust. it simulates account loading, cpi calls, and pda derivations in milliseconds without any network overhead. the catch is that it simulates logic, not economics. it won't enforce rent, fees, or consensus rules. however, you can manually spawn accounts with specific lamports to test edge cases. use litesvm for rapid unit testing of logic, and save the heavy validator tests for final integration checks.