mcpField
T
test-runner

test-runner

github.com/d-o-hubTesting & quality1336 installsUpdated today
Repository

About test-runner

A skill for running and managing Rust tests in a self-learning memory project. It covers test categories, async testing, coverage, and common failure diagnosis.

Key features

  1. 01Unit, integration, and doc tests
  2. 02Mutation testing commands
  3. 03Async test patterns
  4. 04Test isolation practices
  5. 05Coverage generation and troubleshooting

Use cases

  1. 01Run selected Rust test categories
  2. 02Test asynchronous code and timeouts
  3. 03Investigate race conditions or database locks
  4. 04Generate HTML coverage reports

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/d-o-hub/rust-self-learning-memory --skill test-runner

After installing, type/test-runnerin Claude Code to confirm it loaded.

Bundled filesevals/evals.json

Details

From the project README

Test Runner

Execute and manage Rust tests for the self-learning memory project.

Commands

# Unit tests (fast, <30s)
cargo nextest run --lib

# Integration tests
cargo nextest run --test '*'

# Full suite
cargo nextest run --all
cargo test --doc  # doctests (nextest unsupported)

# Quality gates (coverage threshold 90%)
./scripts/quality-gates.sh

Test Categories

CategoryCommandScope
Unitcargo nextest run --libIndividual functions
Integrationcargo nextest run --test '*'End-to-end workflows
Doccargo test --docDocumentation examples
Mutationcargo mutants -p do-memory-coreTest effectiveness

Best Practices

  • Isolation: Each test independent
  • AAA pattern: Arrange-Act-Assert
  • Single responsibility: One behavior per test
  • Naming: test_<function>_<scenario>_<expected>
  • Speed: <1s per unit test

Async Testing

#[tokio::test]
async fn test_episode() { let result = async_fn().await; }

#[tokio::test(start_paused = true)]
async fn test_timeout() { /* paused clock */ }

#[tokio::test(flavor = "multi_thread", worker_threads = 4)]
async fn test_concurrent() { /* parallel ops */ }
BadGood
std::thread::sleep()tokio::time::sleep().await
Missing .awaitAlways await async

Troubleshooting

IssueFix
Race conditionscargo test -- --test-threads=1
redb lock errorsSeparate DB per test
DB connection refusedCheck TURSO_URL/TURSO_TOKEN

Coverage

cargo llvm-cov --html --output-dir coverage

References

  • ADR-033: Modern Testing Strategy

Related skills: test-patterns for test design, test-optimization for performance-focused test work, and test-fix for failing-suite diagnosis.

Comments

Markdown supported