testing-guide

Automate testing patterns for NovelSaga projects with inline tests and E2E validation.

Updated Dec 10, 2025
One-click install
npx skills add https://github.com/novelsaga/NSaga --skill testing-guide-novelsaga
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing-guide
Source: https://github.com/novelsaga/NSaga/tree/main/.opencode/skills/testing-guide
Command: npx skills add https://github.com/novelsaga/NSaga --skill testing-guide-novelsaga

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

NovelSaga testing patterns codify inline tests, end-to-end validation, and cross-runtime coverage to reduce flaky tests and speed up feedback loops.

Core Features & Use Cases

  • Same-file tests using #[cfg(test)] modules embedded in source files to keep tests close to implementation.
  • Integration & E2E testing guidance with xtask-based workflows across multiple runtimes and config formats.
  • Matrix-driven testing strategies: unit, integration, and runtime scenarios ensuring consistent behavior across environments.

Quick Start

Add #[cfg(test)] modules to source files and run cargo test to verify inline tests.

Frequently Asked Questions about testing-guide

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

FAQPage Schema
How do I structure inline Rust tests using cfg test modules?

Inline Rust tests use #[cfg(test)] modules embedded directly in source files, keeping test logic close to the implementation. You run cargo test to verify these same-file tests and accelerate local feedback loops.

What is the best way to configure E2E testing workflows across multiple runtimes?

E2E testing across runtimes uses xtask-based workflows to validate pipelines spanning multiple environments and config formats. This matrix-driven strategy ensures consistent behavior across unit, integration, and runtime-bound scenarios.

Does this testing pattern apply to Rust core crates and CLI bridges?

These testing patterns apply directly to Rust core crates, CLI bridges, and end-to-end pipelines. They cover cross-runtime scenarios where tests must span unit, integration, and runtime-bound execution boundaries.

Why do I need a SKILL.md file with YAML frontmatter for test automation?

A SKILL.md file with YAML frontmatter containing name and description is required to define operational instructions. The Markdown body provides the testing patterns that automate validation and coverage across project components.

How do I reduce flaky tests in Rust integration and E2E pipelines?

Reducing flaky tests requires codifying consistent inline tests, E2E validation, and cross-runtime coverage. Matrix-driven testing strategies across unit, integration, and runtime scenarios standardize behavior and speed up feedback loops.