Skip to content
Back to skills

Rust Integration Test Scaffolder

ASecurity

Scaffold integration tests in src-tauri/tests/ following the project's strict rules. Use when creating new Rust tests, ensuring CI compatibility, or preventing false sense of test coverage from unit tests in src/.

  • 12 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 28, 2026
ai-agentsrustgobashsqltestingdatabase

Works with

  • mcp

Security analysis

A100/100

Scanned November 9, 2026

npx -y skills add fritzprix/libr-agent --skill rust-integration-test-scaffolder --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Rust Integration Test Scaffolder?

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

Security grade badge for Rust Integration Test Scaffolder
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/fritzprix-rust-integration-test-scaffolder/badge)](https://www.skillsdirectory.com/skills/fritzprix-rust-integration-test-scaffolder)

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

SKILL.md
---
name: rust-integration-test-scaffolder
description: Scaffold integration tests in src-tauri/tests/ following the project's strict rules. Use when creating new Rust tests, ensuring CI compatibility, or preventing false sense of test coverage from unit tests in src/.
---

# Rust Integration Test Scaffolder

Scaffold integration tests for LibrAgent following the project's strict testing rules.

## Critical Rule

**CI / `pnpm rust:test` runs `--lib` first, then each `tests/*.rs` target one at a time.**

- `#[cfg(test)]` blocks inside `src/` **do run** via the sequential `--lib` step
- Prefer `tests/` for full Tauri/DB harness coverage (especially Windows-safe root crates)
- Windows `--lib` needs the ComCtl32 v6 linker dependency from `build.rs` (#2122)
- `test = false` in `Cargo.toml` keeps bare `cargo test` from auto-building the lib harness; the runner passes `--lib` explicitly

## Template

```rust
use sqlx::sqlite::SqlitePoolOptions;
use sea_orm::SqlxSqliteConnector;
use tauri_mcp_agent_lib::migration::Migrator;
use sea_orm_migration::MigratorTrait;

async fn setup_db() -> sea_orm::DatabaseConnection {
    let pool = SqlitePoolOptions::new()
        .connect("sqlite::memory:")
        .await
        .unwrap();
    let db = SqlxSqliteConnector::from_sqlx_sqlite_pool(pool);
    Migrator::up(&db, None).await.unwrap();
    db
}

#[tokio::test]
async fn test_descriptive_name() {
    let db = setup_db().await;
    // Test implementation here
}
```

## Test Categories

### Database/Repository Tests

- Test SeaORM entity mappings
- Test repository queries
- Test migration up/down
- Test foreign key constraints

### MCP Integration Tests

- Test builtin server tool execution
- Test session isolation
- Test `MCPServiceProxy` routing
- Test external MCP server connection

### Command Handler Tests

- Test Tauri command inputs/outputs
- Test error handling paths
- Test permission validation

## Placement

- `src-tauri/tests/<module>_tests.rs` - Integration tests by module
- Use descriptive filenames matching the module being tested

## Verification

```bash
# Run all integration tests (CI command)
cargo test --tests

# Run specific test file
cargo test --test <file_stem>
```

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.