Testing & Debugging Rust Programs for Solana — Forge College
In this lesson you will reproduce failing unit and integration tests, trace two distinct integration bugs to their root causes, apply code fixes in the same Rust files you authored earlier, and produce a concise debug_report that documents each issue and verification steps. This lesson sits inside the Programming with Solana track, in the Introduction to Rust for Solana course, as part of the Capstone: Building Basic Rust Programs for Solana module. It builds on the previous work where you laid out instruction.rs, processor.rs, state.rs, and implemented core functions and unit tests; here you validate end-to-end behavior before the capstone build. Topics covered - Running unit and integration tests locally with cargo test and capturing failing output with --nocapture - Enabling backtraces using RUST_BACKTRACE=1 to surface panics and stack information - Using the solana-program-test integration harness to validate program behavior without a public network - Diagnosing common integration bugs such as off-by-one issues in state serialization and incorrect error handling in processor.rs, then applying and verifying fixes - Producing a short debug_report that lists each problem, the root cause, the fix applied, verification commands, and any remaining risks or TODOs Full playlist: https://www.youtube.com/playlist?list=PLjAMVL3818KxgHWvN6C6shmuzzVRHdKw3 This lesson works with Solana concepts and the solana-program-test harness to keep tests isolated from public clusters. When you finish, continue practicing and exploring more Forge College curriculum at https://www.forge.college/ #Solana #Rust #Blockchain #Web3 #ForgeCollege
Download
0 formatsNo download links available.