repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources16d ago| #1 | --- |
| #2 | name: pump-testing |
| #3 | description: "Multi-language test infrastructure for the Pump SDK — Rust unit/integration/security/performance tests, TypeScript Jest tests, Python fuzz tests, shell test orchestration, Criterion benchmarks, and CI quality gates." |
| #4 | metadata: |
| #5 | openclaw: |
| #6 | homepage: https://github.com/nirholas/pump-fun-sdk |
| #7 | --- |
| #8 | |
| #9 | # Testing & Quality — Multi-Language Test Infrastructure |
| #10 | |
| #11 | Comprehensive test infrastructure spanning Rust, TypeScript, Python, and Bash with CI quality gates. |
| #12 | |
| #13 | ## Test Matrix |
| #14 | |
| #15 | | Language | Framework | Directory | Focus | |
| #16 | |----------|-----------|-----------|-------| |
| #17 | | Rust | `cargo test` | `rust/tests/` | Unit, integration, security | |
| #18 | | Rust | Criterion | `rust/benches/` | Performance benchmarks | |
| #19 | | TypeScript | Jest | `typescript/tests/` | Unit, integration | |
| #20 | | TypeScript | Jest | `tests/` | SDK tests | |
| #21 | | Python | Custom | `tests/fuzz/` | Fuzzing | |
| #22 | | Bash | Custom | `tests/cli/` | CLI integration | |
| #23 | |
| #24 | ## Running Tests |
| #25 | |
| #26 | ```bash |
| #27 | # Rust |
| #28 | cargo test # All tests |
| #29 | cargo test --test integration_tests # Integration only |
| #30 | cargo test --test security_tests # Security only |
| #31 | cargo test --test performance_tests # Performance only |
| #32 | cargo bench # Criterion benchmarks |
| #33 | |
| #34 | # TypeScript |
| #35 | npx jest # All Jest tests |
| #36 | npx jest --coverage # With coverage |
| #37 | |
| #38 | # Shell |
| #39 | bash scripts/test-rust.sh # Full Rust test orchestration |
| #40 | bash docs/run-all-tests.sh # Run everything |
| #41 | ``` |
| #42 | |
| #43 | ## Test Orchestration (test-rust.sh — 10 Steps) |
| #44 | |
| #45 | 1. Check Rust toolchain |
| #46 | 2. Run `cargo fmt --check` |
| #47 | 3. Run `cargo clippy` |
| #48 | 4. Run unit tests |
| #49 | 5. Run integration tests |
| #50 | 6. Run security tests |
| #51 | 7. Run performance tests |
| #52 | 8. Run benchmarks |
| #53 | 9. Build release binary |
| #54 | 10. Verify binary output |
| #55 | |
| #56 | ## Quality Gates |
| #57 | |
| #58 | | Gate | Threshold | |
| #59 | |------|-----------| |
| #60 | | Rust tests | All pass | |
| #61 | | TypeScript tests | All pass | |
| #62 | | `cargo clippy` | No warnings | |
| #63 | | `cargo fmt` | Formatted | |
| #64 | | Coverage | >70% | |
| #65 | |
| #66 | ## Stress / Benchmark Tests |
| #67 | |
| #68 | ```bash |
| #69 | # Rust benchmarks |
| #70 | cargo bench --bench generation_bench |
| #71 | |
| #72 | # Stress tests |
| #73 | tests/stress/ # Long-running stability tests |
| #74 | tests/benchmarks/ # SDK benchmark tests |
| #75 | ``` |
| #76 | |
| #77 | ## Patterns to Follow |
| #78 | |
| #79 | - Write tests alongside implementation — not as an afterthought |
| #80 | - Test edge cases: zero amounts, null accounts, maximum values |
| #81 | - Test roundtrip consistency: buy→sell should approximate original (minus fees) |
| #82 | - Use transaction simulation for on-chain behavior verification |
| #83 | - Mock Anchor programs for offline SDK tests |
| #84 | |
| #85 | ## Common Pitfalls |
| #86 | |
| #87 | - Devnet RPC may be rate-limited — use retries in integration tests |
| #88 | - `cargo bench` requires release profile — debug builds give misleading numbers |
| #89 | - Jest `ts-jest` may need explicit `tsconfig.test.json` |
| #90 | - Python fuzz tests may run indefinitely — set timeouts |
| #91 | |
| #92 |