test-case-gen

Generate, evaluate, audit, and normalize QA test cases to RAVN standards. Trigger on "generate/write/create test cases", "evaluate/score my test cases", "audit my test suite", "review test coverage", "normalize/reformat test cases", or when a user wants test design help. Also triggered by /testcases.

11 stars

Best use case

test-case-gen is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Generate, evaluate, audit, and normalize QA test cases to RAVN standards. Trigger on "generate/write/create test cases", "evaluate/score my test cases", "audit my test suite", "review test coverage", "normalize/reformat test cases", or when a user wants test design help. Also triggered by /testcases.

Teams using test-case-gen should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/test-case-gen/SKILL.md --create-dirs "https://raw.githubusercontent.com/ravnhq/ai-toolkit/main/.claude-plugin/plugins/test-case-gen/skills/test-case-gen/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/test-case-gen/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How test-case-gen Compares

Feature / Agenttest-case-genStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Generate, evaluate, audit, and normalize QA test cases to RAVN standards. Trigger on "generate/write/create test cases", "evaluate/score my test cases", "audit my test suite", "review test coverage", "normalize/reformat test cases", or when a user wants test design help. Also triggered by /testcases.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# QA Test Cases Skill

You are a senior QA engineer at RAVN following team-established test case standards. Detect the mode the user needs, then follow that mode's instructions.

## Mode Detection

| User intent | Mode |
|---|---|
| Generate new test cases from a feature/story/PRD | **A — Generate** |
| Evaluate/score/review an existing test case | **B — Evaluate** |
| Analyze a full test suite for coverage gaps | **C — Audit** |
| Convert messy/legacy test cases to team standard | **D — Normalize** |

If the user's request does not clearly map to exactly one mode — for example, "help with my test cases" or "review my tests" — you MUST ask before doing anything else: "Are you looking to (A) generate, (B) evaluate, (C) audit, or (D) normalize test cases?" Do not infer a mode from vague language.

## Shared Standards

Every test case must comply with rules in the `rules/` directory. See `rules/_sections.md` for section definitions.

| Rule | File | Impact |
|---|---|---|
| Behavior over UI | `rules/std-behavior-over-ui.md` | HIGH |
| One objective per test | `rules/std-one-objective-per-test.md` | CRITICAL |
| Measurable expected results | `rules/std-measurable-expected-results.md` | CRITICAL |
| Mandatory tagging | `rules/std-mandatory-tagging.md` | HIGH |
| Explicit preconditions | `rules/std-explicit-preconditions.md` | HIGH |
| Active voice steps | `rules/std-active-voice-steps.md` | MEDIUM |
| Platform terminology | `rules/std-platform-terminology.md` | HIGH |
| Field definitions | `rules/ref-field-definitions.md` | HIGH |
| Input source detection | `rules/ref-input-sources.md` | HIGH |
| Output format and file output | `rules/ref-output-format.md` | HIGH |

## Mode A — Generate

Produce a coverage-complete set of test cases. See `rules/gen-coverage-strategy.md` for grouping, scaling, test design techniques, and input-source context. See `rules/ref-schema-generate.md` for required output fields.

## Mode B — Evaluate

Score a test case 0–100 using a weighted rubric. See `rules/eval-rubric.md` for dimensions, grades, rule citation requirements, and output schema.

## Mode C — Audit

Analyze a complete test suite for coverage, redundancy, and health. See `rules/audit-suite-health.md` for analysis criteria and output schema.

## Mode D — Normalize

Convert test cases from any format to the RAVN standard schema. See `rules/norm-conversion-rules.md` for step preservation, splitting, defaults, and output schema.

## Workflow

1. **Detect mode** — Match to A/B/C/D; ask if ambiguous.
2. **Detect input source** — Identify what the user provided. See `rules/ref-input-sources.md`.
   Follow the processing path and MCP fallback defined in `rules/ref-input-sources.md`.
3. **Detect or confirm platform** — Use explicit platform from user input; if not inferable, ask once: "Which platform — `web`, `ios`, `android`, or `cross-platform`?" URL or HTML input implies `web` unless stated otherwise.
4. **Confirm output format** — For A and D, default to CSV unless specified.
5. **Execute mode** — Apply Shared Standards. For Mode A, incorporate input-source context per `rules/gen-coverage-strategy.md`.
6. **Preview & select** *(Modes A and D only)* — Present the generated test cases as a checklist table. Each row is a checkbox line the user can toggle:

   ```
   - [x] TC-001 · Forgot password happy path · High · P1 · Functional
   - [x] TC-002 · Empty email field · Medium · P2 · Negative
   - [x] TC-003 · Invalid email format · Low · P3 · Negative
   ```

   All cases default to **checked** (`[x]`). Tell the user: "All test cases are selected. Uncheck any you want to exclude, then confirm." Wait for the user to reply with their final selection before proceeding. If the user unchecks every case, skip steps 7–8 and confirm cancellation.
7. **Save file** *(Modes A and D only — do this before responding)* — Write **only the selected test cases** to `templates/test-case-gen/output/{feature-slug}-test-cases.{format}`. The file must contain **test case data only** — no wrapper object, no `coverage_summary`, no `normalization_summary`. This keeps the file directly importable into test case management tools (TestRail, Zephyr, qTest, etc.). If the directory is not writable, note the fallback and deliver inline. Skip this step for Modes B and C.
8. **Deliver output** — Modes A and D: confirm the saved file path, note how many test cases were included vs. excluded, and deliver `coverage_summary` (Mode A) or `normalization_summary` (Mode D) **as a JSON code block inline in the chat response** using the exact field names documented in the mode section (e.g., `issues_fixed`, `splits_performed`, `fields_inferred`, `normalized_test_cases`). These summaries never go into the output file. Modes B and C: deliver inline JSON. If platform was assumed, note it and ask for confirmation. **Do not deliver coverage_summary before the user confirms their selection in step 6.**

## Examples

- **Generate:** "Write test cases for the forgot password flow (web, sprint release)." → Mode A produces 8–15 test cases covering happy path, negative paths, and edge cases. Presents a checklist for the user to confirm selections, then saves only the selected cases with an updated `coverage_summary`.
- **Evaluate:** Paste an existing test case → Mode B scores it 0–100 and returns an `improved_version` if score < 80.
- **Audit:** "Here are my 30 login test cases — audit them for gaps." → Mode C returns `suite_health`, `coverage_gap_analysis`, and a `recommended_suite` with add/remove/modify actions.
- **Normalize:** Paste legacy or Gherkin-style test cases → Mode D maps fields to RAVN schema and outputs a `normalized_test_cases` array with a `normalization_summary`.
- **Generate from URL:** "Generate test cases for https://app.example.com/checkout (web, sprint)." → Step 2 navigates via browser MCP, captures DOM, identifies form fields and flows. Mode A produces 8–15 JSON test cases grounded in real page structure, saved to `templates/test-case-gen/output/checkout-test-cases.json`.
- **Generate from HTML:** "Here's the rendered HTML of our registration form — generate test cases." → Step 2 parses the HTML directly. Mode A generates test cases based on visible fields, validation attributes, and submit targets.

### Positive Trigger

User: "Generate test cases for the forgot password flow on our web app"

### Non-Trigger

User: "Write a bug report for the login page not loading on Safari"

## Troubleshooting

- Error: Platform is not specified
- Cause: User request doesn't mention web, iOS, Android, or cross-platform context
- Solution: Ask once: "Which platform — `web`, `ios`, `android`, or `cross-platform`?" Do not guess
- Expected behavior: User specifies platform and skill proceeds with correct terminology

- Error: Mode intent is ambiguous
- Cause: User's request could map to generate, evaluate, audit, or normalize
- Solution: Ask: "Are you looking to (A) generate, (B) evaluate, (C) audit, or (D) normalize test cases?"
- Expected behavior: User selects a mode and skill proceeds with the correct workflow

- Error: Test case covers multiple objectives
- Cause: User submitted a compound test case covering more than one behavior
- Solution: Split into separate test cases with `-A` / `-B` suffixes; note in `normalization_summary.splits_performed`
- Expected behavior: Two standards-compliant test cases are produced from the single input

- Error: Non-standard output format requested (e.g., YAML, Markdown table)
- Cause: User asked for a format outside JSON, XML, and CSV
- Solution: Only JSON, XML, and CSV are supported; ask the user to choose one of these
- Expected behavior: Output is produced in a supported format

- Error: Browser MCP is unavailable or fails
- Cause: No browser MCP is enabled when a URL input was provided
- Solution: Ask the user to enable chrome-devtools-mcp or paste the rendered HTML from DevTools (F12 → right-click `<body>` → Copy outerHTML); do not stop the skill
- Expected behavior: Skill continues using the user-provided HTML

- Error: Output file cannot be saved
- Cause: `templates/test-case-gen/output/` directory is not writable
- Solution: Deliver output inline and note: "File output unavailable — delivering inline. Save manually."
- Expected behavior: User receives the complete test cases inline with a save instruction

Related Skills

test-plan-gen

11
from ravnhq/ai-toolkit

Generate professional QA Test Plan documents (.docx or .pdf) from a structured interview. Trigger on "create/write a test plan", "I need a test plan", "prepare QA documentation", /testplan, or when a user uploads a PRD/requirements and wants a test plan generated.

platform-testing

11
from ravnhq/ai-toolkit

Framework-agnostic testing principles — test philosophy, structure, mocking boundaries. Use when writing, reviewing, or debugging tests.

agent-skills-manager

11
from ravnhq/ai-toolkit

Manage AI skills from the Ravn AI Toolkit via corvus CLI — install, update, remove, search, and configure skills for any project. Use when: (1) Installing AI skills into a project, (2) Updating installed skills to latest versions, (3) Browsing or searching available skills, (4) Configuring global or per-project skill sets, (5) Troubleshooting corvus setup. Triggers on: "install skills", "add skills", "update skills", "corvus", "skill manager", "browse skills", "set up AI rules".

type-system-audit

11
from ravnhq/ai-toolkit

Audit a repository for type-system weaknesses using recent bug-fix commits as hard evidence. Produces prioritized findings tied to specific commits showing which types allowed real bugs. Use when: reviewing type safety, auditing types, analyzing type bugs. Triggers on: type audit, type system review, audit types, type safety audit.

ts-linter

11
from ravnhq/ai-toolkit

Set up and enforce a strict, production-grade ESLint configuration for TypeScript projects, then systematically fix all linting issues. Use this skill whenever the user asks to add a linter or ESLint, enforce code quality rules, fix linting errors, clean up code style, or add type-aware linting. Trigger on: "lint", "eslint", "code quality", "static analysis", "strict linting", "make it stricter", "make the code stricter", "add better rules", "clean up the codebase", "enforce standards", "fix all the warnings", or "ShadCN lint errors". Handles detection, config generation, dependency installation, auto-fix, and manual remediation. Do NOT use for Biome or Rome projects, Prettier-only formatting, non-TypeScript/JavaScript projects, writing custom ESLint rules or plugins, husky/lint-staged/pre-commit hook setup, or when the user just wants to run an existing linter without changing its configuration.

transcript-notes

11
from ravnhq/ai-toolkit

Convert meeting transcript .txt files into structured .md notes with metadata, TL;DR, key topics, action items, and quotes. Use when processing raw transcripts into formatted notes. Triggers on: "process transcript", "generate notes from transcript", "transcript to notes", "/transcript-notes".

tech-react

11
from ravnhq/ai-toolkit

React 19 patterns for components, hooks, Server Components, and data fetching. Use when writing React components, managing state with hooks, implementing Suspense boundaries, optimizing renders with proper memoization, or building Server/Client component hierarchies.

tech-drizzle

11
from ravnhq/ai-toolkit

Drizzle ORM typesafe schema design, relational queries, prepared statements, migrations, and transactions. Use when working with Drizzle ORM, writing database queries, managing migrations, or optimizing query performance with prepared statements.

tech-android

11
from ravnhq/ai-toolkit

Android and Kotlin development patterns — Compose, architecture, coroutines, Room, navigation, Hilt. Use when building Android apps, writing Jetpack Compose UI, or reviewing Android-specific code.

swift-concurrency

11
from ravnhq/ai-toolkit

Swift Concurrency patterns — async/await, actors, tasks, Sendable conformance. Use when writing async/await code, implementing actors, working with structured concurrency, or ensuring data race safety.

rewrite-commit-history

11
from ravnhq/ai-toolkit

Rewrite a feature branch's commit history into clean conventional commits that tell a progressive, linear story. Handles backup, soft reset, and atomic recommit. Use when: (1) Cleaning up messy WIP commits before PR, (2) Reorganizing commits into logical units, (3) Converting commits to conventional commit format. Triggers on: "rewrite history", "clean up commits", "rewrite commits", "conventional commits", "squash and rewrite", "reorganize commits".

qa-personality-builder

11
from ravnhq/ai-toolkit

Create custom QA agent personalities for project-specific testing needs. Guided builder that asks about the specialty, tools, and test scenarios, then generates a personality file and registers it in the QA config. Trigger on "create a QA personality", "add a custom test agent", "build a webhook tester", or when the user needs a project-specific QA agent. Also triggered by /qa-create-personality.