This document provides a comprehensive framework for testing the entire Atupa monorepo, covering automated Rust workspace tests, frontend Studio testing, local CLI verification, and CI regression checks.
The project leverages Cargo's test runner across all 13 crates:
# 1. Format Check
cargo fmt --all -- --check
# 2. Strict Linting
cargo clippy --workspace --all-targets -- -D warnings
# 3. All Unit & Integration Tests
cargo test --workspaceVerify the embedded React 19 visualizer:
cd studio
# 1. Lint TypeScript and React Components
npm run lint
# 2. Build Static Bundle for Binary Embedding
npm run buildCompile the CLI in release mode:
cargo build --release -p atupa
alias atupa="./target/release/atupa"Verify SVG generation without network dependency:
atupa profile --demo --out profile_demo.svgExpected Output: Profile banner, terminal confirmation, and a valid
profile_demo.svgfile created.
Test trace capture across supported VM runtimes:
# Arbitrum Nitro / EVM
atupa capture --tx 0x8a923... --rpc https://arb-mainnet.g.alchemy.com/v2/KEY
# Solana Sealevel VM (SVM)
atupa capture --tx 5Z9... --rpc https://api.mainnet-beta.solana.com
# Starknet Cairo VM
atupa capture --tx 0x... --rpc https://starknet-mainnet.public.blastapi.io
# Stellar Soroban WASM VM
atupa capture --tx 0x... --rpc https://soroban-testnet.stellar.orgVerify specialized semantic decoding for DeFi protocols:
# Aave v3 + GHO Stablecoin Audit
atupa audit --protocol aave --tx 0x...
# Lido stETH Audit
atupa audit --protocol lido --tx 0x...Verify differential execution analysis:
# Basic comparison
atupa diff --base 0xBASE_HASH --target 0xTARGET_HASH --rpc https://...
# Enforce regression threshold with Markdown report & SVG generation
atupa diff --base 0xBASE_HASH --target 0xTARGET_HASH --threshold 2.0 --markdown --svgLaunch the embedded web server and verify browser loading:
atupa studio --port 5173Expected Output: Local server starts on
http://localhost:5173and automatically opens the visualizer in the default browser.
- Zero Clippy Warnings: All commits must pass
cargo clippy --workspace --all-targets -- -D warnings. - Clean stdout: CLI diagnostic messages use
eprintln!; structured JSON or metric payloads usestdoutso output can be safely piped into files or downstream tools.