Testing¶
Quick Reference¶
Command |
What it runs |
|---|---|
|
All Rust tests (no Docker) |
|
Main crate unit + integration |
|
Core trait + type tests |
|
In-memory backend suite |
|
SQLite backend suite |
|
Redis Docker tests only |
|
MongoDB Docker tests only |
|
MongoDB (v2) Docker tests |
|
PostgreSQL Docker tests only |
|
RabbitMQ Docker tests only |
|
Monitoring dashboard tests |
|
Prometheus sink tests |
|
Proto types + proptest |
|
Test-suite validator |
|
All Rust tests via Makefile |
|
Python binding tests |
|
All tests (Rust + Python) |
Running Tests¶
All Rust Tests¶
cargo test --workspace --exclude py-rustvello
# Or:
make test-rust
Docker-Dependent Tests¶
Tests against real Redis, MongoDB, PostgreSQL, and RabbitMQ require Docker.
They are marked #[ignore = "requires Docker"] and skipped by default:
# Run only Docker tests for a specific backend:
cargo test -p rustvello-redis -- --ignored
# Run ALL tests including Docker:
cargo test -p rustvello-redis -- --include-ignored
# Run Docker tests for all backends:
cargo test --workspace -- --ignored
Feature-Gated Tests¶
# Rayon runner tests
cargo test -p rustvello --features rayon
# Full feature set
cargo test -p rustvello --features full
Python Tests¶
make develop # Build native extension first
make test-python
# Or: uv run pytest
Test Categories¶
Rustvello organizes tests into five categories:
Inline unit tests (
#[cfg(test)] mod tests) — 53 modules across all crates, testing internal logic in isolationBackend compliance suites — shared test functions in
rustvello-test-suiteexercised against every backend implementationIntegration tests —
crates/*/tests/*.rsfiles testing cross-component behaviorProperty-based tests —
proptestfor serde roundtrips and state machine invariantsFuzz tests —
libfuzzer-systargets for deserialization robustnessBenchmarks —
criterionmicro-benchmarks for broker and orchestrator hot paths
See Test Architecture for the design rationale, Adding Backend Tests for writing backend tests, and Advanced Testing for property tests, fuzzing, and benchmarks.