ovh/shai/testing

Claude Code and agent skill by ovh/shai

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Write and run tests, ensure adequate test coverage, and fix failing tests

Install

npx vskill@latest install ovh/shai/testing

SKILL.md

Testing

Purpose

Create, run, and maintain tests for the SHAI project. Ensure new code is tested and existing tests pass.

Running Tests

bash
# Run all tests
cargo test
# Run tests for a specific crate
cargo test -p shai-core
# Run a specific test module
cargo test -p shai-core tools::skills::discovery
# Run a single test function
cargo test -p shai-core test_parse_skill_frontmatter_with_metadata
# Run tests with output
cargo test -- --nocapture
# Run only unit tests (no integration)
cargo test --lib
# Run doc tests
cargo test --doc

Test Conventions

Structure
  • Place unit tests in #[cfg(test)] mod tests at the bottom of the file they test.
  • Place integration tests in the tests/ directory.
  • Name tests descriptively: test_<what>_<condition> (e.g., test_strip_frontmatter_with_metadata).
Coverage Checklist

When writing or reviewing tests, ensure coverage for:

  • Happy path: Normal expected behavior.
  • Edge cases: Empty input, boundary values, single-element collections.
  • Error cases: Invalid input, missing files, permission errors.
  • Integration: Interactions between modules.
Mocking
  • Use mockito or similar for HTTP mocking when needed.
  • Use tempfile::TempDir for filesystem tests.
  • Avoid testing implementation details — test behavior, not internals.

Writing Good Tests

rust
#[test]
fn test_<descriptive_name>() {
// Arrange — set up the test data
let input = ...;
// Act — perform the operation
let result = function_under_test(input);
// Assert — verify the outcome
assert_eq!(result, expected);
}

Guidelines

  • Each test should verify one behavior.
  • Test names should read like a specification: test_<subject>_<expected_behavior>.
  • Prefer many small focused tests over one large test.
  • Use assert! for boolean conditions, assert_eq! for equality.
  • Always clean up resources (use TempDir or Drop implementations).
  • If a test is flaky, fix it — don't disable it without a tracking issue.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/ovh/shai/testing/badge)](https://verified-skill.com/skills/ovh/shai/testing)

Something wrong with this skill or its page? Tell us.