Skip to content
Back to skills

Rust Testing

ASecurity

Write and fix tests in Rust: unit tests in #[cfg(test)] modules, integration tests in tests/, mocking at boundaries, async tests and CI settings.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 2, 2026
ai-agentsrustgotesting

Security analysis

A100/100

Scanned December 2, 2026

npx -y skills add karthikrshet/saarthi --skill rust-testing --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Rust Testing?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Rust Testing
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/karthikrshet-rust-testing/badge)](https://www.skillsdirectory.com/skills/karthikrshet-rust-testing)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: rust-testing
description: "Write and fix tests in Rust: unit tests in #[cfg(test)] modules, integration tests in tests/, mocking at boundaries, async tests and CI settings."
tags: [rust, testing]
---

# Rust Testing

## When to use

- Writing or reviewing Rust tests
- Setting up a test suite
- Fixing slow or flaky tests

## Procedure

1. Unit tests in #[cfg(test)] modules, integration tests in tests/
2. Use proptest for invariants
3. Test async code with #[tokio::test]
4. Use insta for snapshot tests of complex output
5. Run cargo test and cargo nextest in CI

## Checklist

- [ ] Doc tests compile
- [ ] No unwrap in test helpers that hides context

## Anti-patterns

- Over-mocking traits
- Ignoring flaky tests with #[ignore] forever

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.