MCP HubMCP Hub
スキル一覧に戻る

test-design-techniques

proffesor-for-testing
更新日 Today
170 閲覧
99
21
99
GitHubで表示
その他test-designbvaequivalence-partitioningdecision-tablespairwisestate-transition

について

このClaudeスキルは、境界値分析、同値分割、決定表を含む体系的なテスト設計技法を提供します。ペアワイズテストなどの手法を通じて冗長性を削減しながら、開発者が包括的なテストケースを作成することを支援します。複雑なビジネスルールや状態を持つ動作のテスト設計時、または体系的な網羅性を確保する際にご利用ください。

クイックインストール

Claude Code

推奨
プラグインコマンド推奨
/plugin add https://github.com/proffesor-for-testing/agentic-qe
Git クローン代替
git clone https://github.com/proffesor-for-testing/agentic-qe.git ~/.claude/skills/test-design-techniques

このコマンドをClaude Codeにコピー&ペーストしてスキルをインストールします

ドキュメント

Test Design Techniques

<default_to_action> When designing test cases systematically:

  1. APPLY Boundary Value Analysis (test at min, max, edges)
  2. USE Equivalence Partitioning (one test per partition)
  3. CREATE Decision Tables (for complex business rules)
  4. MODEL State Transitions (for stateful behavior)
  5. REDUCE with Pairwise Testing (for combinations)

Quick Design Selection:

  • Numeric ranges → BVA + EP
  • Multiple conditions → Decision Tables
  • Workflows → State Transition
  • Many parameters → Pairwise Testing

Critical Success Factors:

  • Systematic design finds more bugs with fewer tests
  • Random testing is inefficient
  • 40+ years of research backs these techniques </default_to_action>

Quick Reference Card

When to Use

  • Designing new test suites
  • Optimizing existing tests
  • Complex business rules
  • Reducing test redundancy

Technique Selection Guide

ScenarioTechnique
Numeric input rangesBVA + EP
Multiple conditionsDecision Tables
Stateful workflowsState Transition
Many parameter combinationsPairwise
All combinations criticalFull Factorial

Boundary Value Analysis (BVA)

Principle: Bugs cluster at boundaries.

Test at boundaries:

  • Minimum valid value
  • Just below minimum (invalid)
  • Just above minimum (valid)
  • Maximum valid value
  • Just above maximum (invalid)
// Age field: 18-120 valid
const boundaryTests = [
  { input: 17, expected: 'invalid' },  // Below min
  { input: 18, expected: 'valid' },    // Min boundary
  { input: 19, expected: 'valid' },    // Above min
  { input: 119, expected: 'valid' },   // Below max
  { input: 120, expected: 'valid' },   // Max boundary
  { input: 121, expected: 'invalid' }  // Above max
];

Equivalence Partitioning (EP)

Principle: One test per equivalent class.

// Discount rules:
// 1-10:  No discount
// 11-100: 10% discount
// 101+:   20% discount

const partitionTests = [
  { quantity: -1, expected: 'invalid' },  // Invalid partition
  { quantity: 5, expected: 0 },           // Partition 1: 1-10
  { quantity: 50, expected: 0.10 },       // Partition 2: 11-100
  { quantity: 200, expected: 0.20 }       // Partition 3: 101+
];

// 4 tests cover all behavior (vs 200+ if testing every value)

Decision Tables

Use for: Complex business rules with multiple conditions.

Loan Approval Rules:
┌──────────────┬───────┬───────┬───────┬───────┬───────┐
│ Conditions   │ R1    │ R2    │ R3    │ R4    │ R5    │
├──────────────┼───────┼───────┼───────┼───────┼───────┤
│ Age ≥ 18     │ Yes   │ Yes   │ Yes   │ No    │ Yes   │
│ Credit ≥ 700 │ Yes   │ Yes   │ No    │ Yes   │ No    │
│ Income ≥ 50k │ Yes   │ No    │ Yes   │ Yes   │ Yes   │
├──────────────┼───────┼───────┼───────┼───────┼───────┤
│ Result       │Approve│Approve│Reject │Reject │Reject │
└──────────────┴───────┴───────┴───────┴───────┴───────┘

// 5 tests cover all decision combinations

State Transition Testing

Model state changes:

States: Logged Out → Logged In → Premium → Suspended

Valid Transitions:
- Login: Logged Out → Logged In
- Upgrade: Logged In → Premium
- Payment Fail: Premium → Suspended
- Logout: Any → Logged Out

Invalid Transitions to Test:
- Logged Out → Premium (should reject)
- Suspended → Premium (should reject)
test('cannot upgrade without login', async () => {
  const result = await user.upgrade(); // While logged out
  expect(result.error).toBe('Login required');
});

Pairwise (Combinatorial) Testing

Problem: All combinations explode exponentially.

// Parameters:
// Browser: Chrome, Firefox, Safari (3)
// OS: Windows, Mac, Linux (3)
// Screen: Desktop, Tablet, Mobile (3)

// All combinations: 3 × 3 × 3 = 27 tests
// Pairwise: 9 tests cover all pairs

const pairwiseTests = [
  { browser: 'Chrome', os: 'Windows', screen: 'Desktop' },
  { browser: 'Chrome', os: 'Mac', screen: 'Tablet' },
  { browser: 'Chrome', os: 'Linux', screen: 'Mobile' },
  { browser: 'Firefox', os: 'Windows', screen: 'Tablet' },
  { browser: 'Firefox', os: 'Mac', screen: 'Mobile' },
  { browser: 'Firefox', os: 'Linux', screen: 'Desktop' },
  { browser: 'Safari', os: 'Windows', screen: 'Mobile' },
  { browser: 'Safari', os: 'Mac', screen: 'Desktop' },
  { browser: 'Safari', os: 'Linux', screen: 'Tablet' }
];
// Each pair appears at least once

Agent-Driven Test Design

// Auto-generate BVA tests
await Task("Generate BVA Tests", {
  field: 'age',
  dataType: 'integer',
  constraints: { min: 18, max: 120 }
}, "qe-test-generator");
// Returns: 6 boundary test cases

// Auto-generate pairwise tests
await Task("Generate Pairwise Tests", {
  parameters: {
    browser: ['Chrome', 'Firefox', 'Safari'],
    os: ['Windows', 'Mac', 'Linux'],
    screen: ['Desktop', 'Tablet', 'Mobile']
  }
}, "qe-test-generator");
// Returns: 9-12 tests (vs 27 full combination)

Agent Coordination Hints

Memory Namespace

aqe/test-design/
├── bva-analysis/*       - Boundary value tests
├── partitions/*         - Equivalence partitions
├── decision-tables/*    - Decision table tests
└── pairwise/*           - Combinatorial reduction

Fleet Coordination

const designFleet = await FleetManager.coordinate({
  strategy: 'systematic-test-design',
  agents: [
    'qe-test-generator',    // Apply design techniques
    'qe-coverage-analyzer', // Analyze coverage
    'qe-quality-analyzer'   // Assess test quality
  ],
  topology: 'sequential'
});

Related Skills


Remember

Systematic design > Random testing. 40+ years of research shows these techniques find more bugs with fewer tests than ad-hoc approaches.

Combine techniques for comprehensive coverage. BVA for boundaries, EP for partitions, decision tables for rules, pairwise for combinations.

With Agents: qe-test-generator applies these techniques automatically, generating optimal test suites with maximum coverage and minimum redundancy. Agents identify boundaries, partitions, and combinations from code analysis.

GitHub リポジトリ

proffesor-for-testing/agentic-qe
パス: .claude/skills/test-design-techniques
agenticqeagenticsfoundationagentsquality-engineering

関連スキル

regression-testing

その他

This skill strategically selects and runs regression tests based on code changes and risk, ensuring fixes don't break existing functionality. It analyzes impact, optimizes test execution for faster feedback, and helps manage continuous regression within CI/CD. Use it for verifying changes, planning test suites, or streamlining test execution.

スキルを見る

test-environment-management

その他

This Claude Skill manages test infrastructure using infrastructure as code, Docker/Kubernetes for consistent environments, and service virtualization. It helps developers ensure environment parity with production and optimize testing costs through auto-shutdown and spot instances. Use it when provisioning test environments or managing testing infrastructure.

スキルを見る

mutation-testing

その他

The mutation-testing skill evaluates test suite effectiveness by automatically introducing code mutations and measuring the kill rate. It helps developers identify weak tests and improve test quality by revealing which bugs tests actually catch. This specialized-testing skill uses multiple agents to mutate code, run tests against mutants, and highlight areas needing stronger assertions.

スキルを見る

mobile-testing

その他

This Claude Skill provides comprehensive mobile testing for iOS and Android applications, covering gestures, sensors, permissions, and device fragmentation. Use it when testing native apps, hybrid apps, or mobile web to ensure quality across 1000+ device variants. It focuses on platform differences, real-device validation, and mobile-specific scenarios like offline mode.

スキルを見る