Tests are evidence against an identified contract. New behavior starts with a failing test, and contract fixtures are reviewed artifacts rather than snapshots updated automatically after a failure.
Unit tests live beside Rust modules and cover domain logic without network or database dependencies.
cargo test --workspace --libRelease-name parsing and custom-format matching accept hostile, combinatorial
input. Add proptest cases beside their unit suites and ensure failures persist
the minimal reproducer. Property tests run as part of the workspace test gate.
Database tests use MariaDB 11.4 LTS and an isolated schema. Tests must create
their own state and may not depend on ordering. NNTP integration tests use the
published mock NNTP server rather than a live provider. The exact container
command will be exposed by just test-integration during P1.
P2 introduces contracts/arr-v3/ with one directory per façade and client.
Each fixture contains a sanitized request, the expected status and headers, and
the expected JSON body. Dynamic IDs, ports, and timestamps are represented by
explicit normalizers in fixture metadata; the structural diff is otherwise
strict.
To add a golden file after the P2 harness lands:
- Capture traffic from the pinned reference application through the recording proxy.
- Remove credentials, tokens, personal paths, and user data.
- Add only the narrowest required normalizers.
- Replay against the reference application and confirm a zero diff.
- Replay against StackArr and keep the generated test red.
- Implement the endpoint, make the test green, and include the fixture diff in review.
just test-compat runs generated OpenAPI contract tests. just conformance
replays golden traffic and reports path coverage once the harness exists.
The React UI uses Playwright in ui/e2e. Golden paths and key failure paths are
required for GUI changes.
npm --prefix ui ci --no-audit --no-fund
npm --prefix ui run test:e2eContainer and live-client E2E tests must use disposable data and document every external prerequisite. They must never contain real credentials.
cargo build --workspace
cargo fmt --all -- --check
cargo clippy --workspace --all-features -- -D warnings
cargo test --workspace --all-featuresCoverage is a per-crate ratchet: a change may improve coverage but may not lower the checked-in baseline without an explicit, reviewed justification.