Skip to main content 首页 创作者 proffesor-for-testing sentinel-api-testing test-design-techniques
test-design-techniques Systematic test design with boundary value analysis, equivalence partitioning, decision tables, state transition testing, and combinatorial testing. Use when designing comprehensive test cases, reducing redundant tests, or ensuring systematic coverage.
跳到安装 Skills Marketplace 发现并探索由社区构建的 Agent Skills
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/proffesor-for-testing/sentinel-api-testing --skill test-design-techniques命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
下载 Zip 下载中... name test-design-techniques description Systematic test design with boundary value analysis, equivalence partitioning, decision tables, state transition testing, and combinatorial testing. Use when designing comprehensive test cases, reducing redundant tests, or ensuring systematic coverage. category specialized-testing priority high tokenEstimate 900 agents ["qe-test-generator","qe-coverage-analyzer","qe-quality-analyzer"] implementation_status optimized optimization_version 1 last_optimized 2025-12-02T00:00:00.000Z dependencies [] quick_reference_card true tags ["test-design","bva","equivalence-partitioning","decision-tables","pairwise","state-transition"]
Test Design Techniques
<default_to_action>
When designing test cases systematically:
APPLY Boundary Value Analysis (test at min, max, edges)
USE Equivalence Partitioning (one test per partition)
CREATE Decision Tables (for complex business rules)
MODEL State Transitions (for stateful behavior)
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
Scenario Technique Numeric input ranges BVA + EP Multiple conditions Decision Tables Stateful workflows State Transition Many parameter combinations Pairwise All combinations critical Full 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)
const boundaryTests = [
{ input : 17 , expected : 'invalid' },
{ input : , : },
{ : , : },
{ : , : },
{ : , : },
{ : , : }
];
18
expected
'valid'
input
19
expected
'valid'
input
119
expected
'valid'
input
120
expected
'valid'
input
121
expected
'invalid'
Equivalence Partitioning (EP) Principle: One test per equivalent class.
const partitionTests = [
{ quantity : -1 , expected : 'invalid' },
{ quantity : 5 , expected : 0 },
{ quantity : 50 , expected : 0.10 },
{ quantity : 200 , expected : 0.20 }
];
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 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 ();
expect (result.error ).toBe ('Login required' );
});
Pairwise (Combinatorial) Testing Problem: All combinations explode exponentially.
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' }
];
Agent-Driven Test Design
await Task ("Generate BVA Tests" , {
field : 'age' ,
dataType : 'integer' ,
constraints : { min : 18 , max : 120 }
}, "qe-test-generator" );
await Task ("Generate Pairwise Tests" , {
parameters : {
browser : ['Chrome' , 'Firefox' , 'Safari' ],
os : ['Windows' , 'Mac' , 'Linux' ],
screen : ['Desktop' , 'Tablet' , 'Mobile' ]
}
}, "qe-test-generator" );
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' ,
'qe-coverage-analyzer' ,
'qe-quality-analyzer'
],
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.
proffesor-for-testing
proffesor-for-testing/sentinel-api-testing
打开 GitHub 仓库