Skip to content

docs: add comprehensive testing documentation - #4

Open
gadst12 wants to merge 1 commit into
mainfrom
docs/comprehensive-testing-documentation
Open

docs: add comprehensive testing documentation#4
gadst12 wants to merge 1 commit into
mainfrom
docs/comprehensive-testing-documentation

Conversation

@gadst12

@gadst12 gadst12 commented Jun 26, 2026

Copy link
Copy Markdown
Owner

Summary

Adds docs/testing.md — documents VoteChain's full testing strategy including all test layers, test environment setup, commands for running each layer, coverage thresholds enforced by CI, and guidelines for writing new tests.

Changes

  • docs/testing.md (new file, 411 lines)
    • Testing strategy overview table (unit, integration, property-based, TTL, load) with file locations and responsibilities
    • Test environment setup: Rust 1.75+, wasm32 target, no external services required; Docker option
    • Commands for: full suite, per-contract, specific test, with/without output, property-based, integration, load, and snapshot tests
    • Per-layer breakdown documenting exactly what each file covers (unit: 40+ governance tests, 20+ token tests; integration: 3 E2E scenarios; proptest: pass/reject formula invariants; TTL: persistent storage expiry; load: 1 000 proposals, 10 000 votes)
    • test_helpers.rs usage guide with example
    • Coverage: 80% line coverage minimum enforced in CI per package; cargo-llvm-cov commands for HTML and LCOV reports
    • CI jobs table: test, fmt-check, lint, coverage, security-audit, build-wasm, wasm-validity
    • Rules for writing new tests, naming convention, example unit test, example property-based test
    • Test snapshot update procedure

Acceptance criteria

  • Testing docs describe test responsibilities per layer
  • Commands for running tests are included
  • Coverage and CI expectations are documented
  • Any required test environment setup is described

Closes Vera3289#518

Documents all test layers (unit, integration, property-based, TTL, load),
test environment setup, commands for running each layer, coverage thresholds
(80% minimum enforced in CI), CI job descriptions, and guidelines for
writing new tests.

Closes Vera3289#518
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant