testing

Create and run unit, integration, property-based, and benchmark tests for Rust/WASM projects.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/terraphim/terraphim-skills --skill testing-terraphim
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing
Source: https://github.com/terraphim/terraphim-skills/tree/main/skills/testing
Command: npx skills add https://github.com/terraphim/terraphim-skills --skill testing-terraphim

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enables teams to design and maintain comprehensive automated tests for Rust and WebAssembly projects, ensuring correctness, reliability, and rapid feedback throughout development.

Core Features & Use Cases

  • Unit Testing: validate individual functions and edge cases with clear, self-documenting tests.
  • Integration Testing: verify interactions between modules and API contracts.
  • Property-Based Testing: explore large input spaces with randomized testing using proptest.
  • Performance Testing: benchmark critical paths to detect regressions with Criterion.
  • Use Case: ensure a Rust/Wasm library remains safe and performant after refactors or optimizations.

Quick Start

Run cargo test to execute all unit and integration tests, then cargo bench to run benchmarks, and extend tests with property-based scenarios as needed.

Frequently Asked Questions about testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up comprehensive Rust and WASM tests for my library?

Set up comprehensive Rust and WASM tests by defining structured unit, integration, property-based, and benchmarking tests using cargo, proptest, and criterion. Execute tests deterministically and collect performance data to validate code correctness.

What is property-based testing in Rust and when should I use it?

Property-based testing in Rust explores large input spaces with randomized testing using proptest. Use it during development, refactoring, and performance optimization to validate edge cases and ensure library safety across varied inputs.

How do I benchmark Rust code to detect performance regressions?

Benchmark Rust code to detect regressions by using Criterion to measure critical paths. Run cargo bench to execute benchmarks, collect performance data, and compare results to identify optimizations needed during refactoring workflows.

Does this testing approach work with WebAssembly projects?

This testing approach works with WebAssembly projects by validating interactions between modules and API contracts. Integration testing verifies Wasm module correctness, while unit tests validate individual functions and edge cases across development workflows.

What is the best way to structure unit and integration tests in a Rust project?

The best way to structure Rust tests separates unit tests for individual functions and integration tests for module interactions. Use cargo test to execute both, ensuring clear, self-documenting validation of API contracts and edge cases.

Why do I need proptest and criterion to test my Rust application?

You need proptest for property-based randomized testing to explore input spaces and criterion for benchmarking critical paths. Together they ensure correctness, reliability, and rapid feedback throughout Rust and Wasm development workflows.