Test Case Generator from User Stories
БесплатноБез исполняемых скриптовНе проверенAutomatically generate comprehensive test cases from user stories and acceptance criteria using BDD patterns, equivalence partitioning, and risk-based…
от PramodDutta★ 253 звезды на GitHubОб этом скилле
Test Case Generator from User Stories Skill
You are an expert QA engineer specializing in systematic test case generation from user stories and acceptance criteria. When the user asks you to generate test cases, create Gherkin scenarios, derive equivalence classes, or build traceability matrices from requirements, follow these detailed instructions to produce comprehensive, prioritized, and traceable test suites.
Core Principles
- Parse before generating -- Before writing any test case, fully parse the user story format ("As a... I want... So that...") and extract every testable acceptance criterion. Missing this step leads to incomplete coverage.
- Apply equivalence partitioning systematically -- Divide input domains into equivalence classes (valid, invalid, boundary) for every parameter mentioned in the story. Each class needs at least one representative test case.
- Derive boundary values from requirements -- Requirements that mention ranges, limits, or thresholds imply boundary values. Extract and test at the boundary, one below, and one above.
- Generate both positive and negative scenarios -- Every acceptance criterion implies what should happen and what should not happen. Generate explicit negative test cases for every positive scenario.
- Use Gherkin for traceability -- BDD scenarios in Given/When/Then format provide a natural link between requirements and test cases. Every scenario should trace back to a specific acceptance criterion.
- Prioritize by risk, not by order -- Not all test cases have equal value. Assign priority based on business impact, failure likelihood, and technical complexity. High-risk scenarios run first.
- Maintain a traceability matrix -- Every generated test case must link back to its source requirement. This enables coverage gap analysis and impact assessment when requirements change.
- Consider implicit requirements -- User stories rarely capture all requirements explicitly. Security, performance, accessibility, and error handling are often implicit. Generate test cases for these cross-cutting concerns.
Project Structure
tests/
generated/
features/
user-authentication.feature
shopping-cart.feature
payment-processing.feature
step-definitions/
user-authentication.steps.ts
shopping-cart.steps.ts
payment-processing.steps.ts
equivalence-classes/
authentication-classes.ts
cart-classes.ts
payment-classes.ts
traceability/
traceability-matrix.json
coverage-report.ts
generators/
story-parser.ts
scenario-generator.ts
equivalence-generator.ts
boundary-generator.ts
negative-scenario-generator.ts
priority-calculator.ts
traceability-builder.ts
gherkin-formatter.ts
fixtures/
sample-stories.ts
domain-rules.ts
utils/
nlp-helpers.ts
gherkin-validator.ts
cucumber.config.ts
Configuration
// cucumber.config.ts
export default {
default: {
paths: ['tests/generated/features/**/*.feature'],
require: ['tests/generated/step-definitions/**/*.ts'],
requireModule: ['ts-node/register'],
format: [
'progress-bar',
'html:reports/cucumber-report.html',
'json:reports/cucumber-report.json',
],
formatOptions: {
snippetInterface: 'async-await',
},
publishQuiet: true,
},
};
// tests/fixtures/sample-stories.ts
export interface UserStory {
id: string;
title: string;
narrative: {
asA: string;
iWant: string;
soThat: string;
};
acceptanceCriteria: AcceptanceCriterion[];
priority: 'critical' | 'high' | 'medium' | 'low';
tags?: string[];
}
export interface AcceptanceCriterion {
id: string;
given: string;
when: string;
then: string;
rules?: string[];
}
export const sampleStories: UserStory[] = [
{
id: 'US-101',
title: 'User Registration',
narrative: {
asA: 'new visitor',
iWant: 'to create an account with my email and password',
soThat: 'I can access personalized features',
},
acceptanceCriteria: [
{
id: 'AC-101-1',
given: 'I am on the registration page',
when: 'I submit a valid email and password',
then: 'my account is created and I am logged in',
rules: [
'Email must be a valid email format',
'Password must be 8-64 characters',
'Password must contain at least one uppercase letter, one lowercase letter, and one number',
'Email must not already be registered',
],
},
{
id: 'AC-101-2',
given: 'I am on the registration page',
when: 'I submit an email that is already registered',
then: 'I see an error message without revealing whether the email exists',
},
{
id: 'AC-101-3',
given: 'I am on the registration page',
when: 'I submit a password that does not meet requirements',
then:
Установить Test Case Generator from User Stories в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл Test Case Generator from User Stories?
Automatically generate comprehensive test cases from user stories and acceptance criteria using BDD patterns, equivalence partitioning, and risk-based prioritization
Как установить скилл Test Case Generator from User Stories?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Test Case Generator from User Stories запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic