six-thinking-hats

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Six Thinking Hats for Testing

用于测试的六顶思考帽

<default_to_action> When analyzing testing decisions:
  1. DEFINE focus clearly (specific testing question)
  2. APPLY each hat sequentially (5 min each)
  3. DOCUMENT insights per hat
  4. SYNTHESIZE into action plan
Quick Hat Rotation (30 min):
markdown
🤍 WHITE (5 min) - Facts only: metrics, data, coverage
❤️ RED (3 min) - Gut feelings (no justification needed)
🖤 BLACK (7 min) - Risks, gaps, what could go wrong
💛 YELLOW (5 min) - Strengths, opportunities, what works
💚 GREEN (7 min) - Creative ideas, alternatives
🔵 BLUE (3 min) - Action plan, next steps
Example for "API Test Strategy":
  • 🤍 47 endpoints, 30% coverage, 12 integration tests
  • ❤️ Anxious about security, confident on happy paths
  • 🖤 No auth tests, rate limiting untested, edge cases missing
  • 💛 Good docs, CI/CD integrated, team experienced
  • 💚 Contract testing with Pact, chaos testing, property-based
  • 🔵 Security tests first, contract testing next sprint </default_to_action>
<default_to_action> 分析测试决策时:
  1. 清晰定义焦点(明确的测试问题)
  2. 依次应用每顶帽子(每顶5分钟)
  3. 记录每顶帽子的洞察
  4. 整合为行动计划
快速轮帽(30分钟):
markdown
🤍 白帽(5分钟)- 仅关注事实:指标、数据、覆盖率
❤️ 红帽(3分钟)- 直觉感受(无需证明)
🖤 黑帽(7分钟)- 风险、差距、可能出现的问题
💛 黄帽(5分钟)- 优势、机会、有效的部分
💚 绿帽(7分钟)- 创意想法、替代方案
🔵 蓝帽(3分钟)- 行动计划、后续步骤
“API测试策略”示例:
  • 🤍 47个端点,30%覆盖率,12个集成测试
  • ❤️ 对安全性感到担忧,对正常路径有信心
  • 🖤 无认证测试,未测试速率限制,缺少边缘场景
  • 💛 文档完善,已集成CI/CD,团队经验丰富
  • 💚 采用Pact进行契约测试、混沌测试、基于属性的测试
  • 🔵 优先开展安全测试,下个迭代实施契约测试 </default_to_action>

Quick Reference Card

快速参考卡

The Six Hats

六顶帽子

HatFocusKey Question
🤍 WhiteFacts & DataWhat do we KNOW?
❤️ RedEmotionsWhat do we FEEL?
🖤 BlackRisksWhat could go WRONG?
💛 YellowBenefitsWhat's GOOD?
💚 GreenCreativityWhat ELSE could we try?
🔵 BlueProcessWhat should we DO?
帽子关注重点核心问题
🤍 白帽事实与数据我们知道什么?
❤️ 红帽情感感受我们的感受如何?
🖤 黑帽风险隐患可能会出什么问题?
💛 黄帽收益优势哪些方面表现良好?
💚 绿帽创新创意我们还可以尝试什么?
🔵 蓝帽流程管控我们应该采取什么行动?

When to Use Each Hat

各帽子的适用场景

HatUse For
🤍 WhiteBaseline metrics, test data inventory
❤️ RedTeam confidence check, quality gut feel
🖤 BlackRisk assessment, gap analysis, pre-mortems
💛 YellowStrengths audit, quick win identification
💚 GreenTest innovation, new approaches, brainstorming
🔵 BlueStrategy planning, retrospectives, decision-making

帽子适用场景
🤍 白帽基准指标、测试数据盘点
❤️ 红帽团队信心检查、质量直觉判断
🖤 黑帽风险评估、差距分析、事前复盘
💛 黄帽优势审计、快速识别可落地机会
💚 绿帽测试创新、新方法探索、头脑风暴
🔵 蓝帽策略规划、回顾总结、决策制定

Hat Details

各帽子详细说明

🤍 White Hat - Facts & Data

🤍 白帽 - 事实与数据

Output: Quantitative testing baseline
Questions:
  • What test coverage do we have?
  • What is our pass/fail rate?
  • What environments exist?
  • What is our defect history?
Example Output:
Coverage: 67% line, 45% branch
Test Suite: 1,247 unit, 156 integration, 23 E2E
Execution Time: Unit 3min, Integration 12min, E2E 45min
Defects: 23 open (5 critical, 8 major, 10 minor)
输出:量化测试基准
问题:
  • 我们的测试覆盖率是多少?
  • 测试的通过率/失败率是多少?
  • 有哪些测试环境?
  • 缺陷历史如何?
示例输出:
覆盖率:代码行覆盖率67%,分支覆盖率45%
测试套件:1247个单元测试,156个集成测试,23个端到端测试
执行时间:单元测试3分钟,集成测试12分钟,端到端测试45分钟
缺陷:23个未解决缺陷(5个严重,8个主要,10个次要)

🖤 Black Hat - Risks & Cautions

🖤 黑帽 - 风险与警示

Output: Comprehensive risk assessment
Questions:
  • What could go wrong in production?
  • What are we NOT testing?
  • What assumptions might be wrong?
  • Where are the coverage gaps?
HIGH RISKS:
- No load testing (production outage risk)
- Auth edge cases untested (security vulnerability)
- Database failover never tested (data loss risk)
输出:全面风险评估
问题:
  • 生产环境中可能出现什么问题?
  • 我们遗漏了哪些测试内容?
  • 哪些假设可能是错误的?
  • 覆盖率存在哪些缺口?
高风险项:
- 未进行负载测试(存在生产环境宕机风险)
- 认证边缘场景未测试(存在安全漏洞风险)
- 数据库故障转移从未测试(存在数据丢失风险)

💛 Yellow Hat - Benefits & Optimism

💛 黄帽 - 收益与乐观视角

Output: Strengths and opportunities
Questions:
  • What's working well?
  • What strengths can we leverage?
  • What quick wins are available?
STRENGTHS:
- Strong CI/CD pipeline
- Team expertise in automation
- Stakeholders value quality

QUICK WINS:
- Add smoke tests (reduce incidents)
- Automate manual regression (save 2 days/release)
输出:优势与机会
问题:
  • 哪些方面运行良好?
  • 我们可以利用哪些优势?
  • 有哪些快速可实现的成果?
优势:
- 强大的CI/CD流水线
- 团队具备自动化测试专业能力
- 利益相关者重视质量

快速落地机会:
- 添加冒烟测试(减少事故)
- 自动化手动回归测试(每个版本节省2天时间)

💚 Green Hat - Creativity

💚 绿帽 - 创新创意

Output: Innovative testing ideas
Questions:
  • How else could we test this?
  • What if we tried something completely different?
  • What emerging techniques could we adopt?
IDEAS:
1. AI-powered test generation
2. Chaos engineering for resilience
3. Property-based testing for edge cases
4. Production traffic replay
5. Synthetic monitoring
输出:创新性测试思路
问题:
  • 我们还可以用哪些方式测试?
  • 如果尝试完全不同的方法会怎样?
  • 我们可以采用哪些新兴技术?
创意想法:
1. AI驱动的测试用例生成
2. 用于韧性验证的混沌工程
3. 针对边缘场景的基于属性的测试
4. 生产流量回放
5. 合成监控

❤️ Red Hat - Emotions

❤️ 红帽 - 情感感受

Output: Team gut feelings (NO justification needed)
Questions:
  • How confident do you feel about quality?
  • What makes you anxious?
  • What gives you confidence?
FEELINGS:
- Confident: Unit tests, API tests
- Anxious: Authentication flow, payment processing
- Frustrated: Flaky tests, slow E2E suite
输出:团队直觉感受(无需证明)
问题:
  • 你对当前质量有多大信心?
  • 哪些方面让你感到担忧?
  • 哪些方面让你有信心?
感受:
- 有信心:单元测试、API测试
- 担忧:认证流程、支付处理
- 困扰:不稳定的测试用例、缓慢的端到端测试套件

🔵 Blue Hat - Process

🔵 蓝帽 - 流程管控

Output: Action plan with owners and timelines
Questions:
  • What's our strategy?
  • How should we prioritize?
  • What's the next step?
PRIORITIZED ACTIONS:
1. [Critical] Address security testing gap - Owner: Alice
2. [High] Implement contract testing - Owner: Bob
3. [Medium] Reduce flaky tests - Owner: Carol

输出:明确负责人与时间线的行动计划
问题:
  • 我们的策略是什么?
  • 应该如何划分优先级?
  • 下一步行动是什么?
优先级行动:
1. [关键] 填补安全测试缺口 - 负责人:Alice
2. [高优先级] 实施契约测试 - 负责人:Bob
3. [中优先级] 减少不稳定测试用例 - 负责人:Carol

Session Templates

会话模板

Solo Session (30 min)

单人会话(30分钟)

markdown
undefined
markdown
undefined

Six Hats Analysis: [Topic]

六顶帽子分析:[主题]

🤍 White Hat (5 min)

🤍 白帽(5分钟)

Facts: [list metrics, data]
事实:[列出指标、数据]

❤️ Red Hat (3 min)

❤️ 红帽(3分钟)

Feelings: [gut reactions, no justification]
感受:[直觉反应,无需证明]

🖤 Black Hat (7 min)

🖤 黑帽(7分钟)

Risks: [what could go wrong]
风险:[可能出现的问题]

💛 Yellow Hat (5 min)

💛 黄帽(5分钟)

Strengths: [what works, opportunities]
优势:[运行良好的方面、机会]

💚 Green Hat (7 min)

💚 绿帽(7分钟)

Ideas: [creative alternatives]
创意:[创新性替代方案]

🔵 Blue Hat (3 min)

🔵 蓝帽(3分钟)

Actions: [prioritized next steps]
undefined
行动:[按优先级排序的下一步计划]
undefined

Team Session (60 min)

团队会话(60分钟)

  • Each hat: 10 minutes
  • Rotate through hats as group
  • Document on shared whiteboard
  • Blue Hat synthesizes at end

  • 每顶帽子分配10分钟
  • 团队依次完成各帽子的分析
  • 在共享白板上记录内容
  • 最后由蓝帽视角整合成果

Agent Integration

Agent集成

typescript
// Risk-focused analysis (Black Hat)
const risks = await Task("Identify Risks", {
  scope: 'payment-module',
  perspective: 'black-hat',
  includeMitigation: true
}, "qe-regression-risk-analyzer");

// Creative test approaches (Green Hat)
const ideas = await Task("Generate Test Ideas", {
  feature: 'new-auth-system',
  perspective: 'green-hat',
  includeEmergingTechniques: true
}, "qe-test-generator");

// Comprehensive analysis (All Hats)
const analysis = await Task("Six Hats Analysis", {
  topic: 'Q1 Test Strategy',
  hats: ['white', 'black', 'yellow', 'green', 'red', 'blue']
}, "qe-quality-analyzer");

typescript
// 风险聚焦分析(黑帽)
const risks = await Task("Identify Risks", {
  scope: 'payment-module',
  perspective: 'black-hat',
  includeMitigation: true
}, "qe-regression-risk-analyzer");

// 创新性测试方法(绿帽)
const ideas = await Task("Generate Test Ideas", {
  feature: 'new-auth-system',
  perspective: 'green-hat',
  includeEmergingTechniques: true
}, "qe-test-generator");

// 综合分析(全帽子)
const analysis = await Task("Six Hats Analysis", {
  topic: 'Q1 Test Strategy',
  hats: ['white', 'black', 'yellow', 'green', 'red', 'blue']
}, "qe-quality-analyzer");

Agent Coordination Hints

Agent协作提示

Memory Namespace

内存命名空间

aqe/six-hats/
├── analyses/*        - Complete hat analyses
├── risks/*           - Black hat findings
├── opportunities/*   - Yellow hat findings
└── innovations/*     - Green hat ideas
aqe/six-hats/
├── analyses/*        - 完整的帽子分析结果
├── risks/*           - 黑帽发现
├── opportunities/*   - 黄帽发现
└── innovations/*     - 绿帽创意

Fleet Coordination

集群协作

typescript
const analysisFleet = await FleetManager.coordinate({
  strategy: 'six-hats-analysis',
  agents: [
    'qe-quality-analyzer',        // White + Blue hats
    'qe-regression-risk-analyzer', // Black hat
    'qe-test-generator'           // Green hat
  ],
  topology: 'parallel'
});

typescript
const analysisFleet = await FleetManager.coordinate({
  strategy: 'six-hats-analysis',
  agents: [
    'qe-quality-analyzer',        // 白帽 + 蓝帽
    'qe-regression-risk-analyzer', // 黑帽
    'qe-test-generator'           // 绿帽
  ],
  topology: 'parallel'
});

Related Skills

相关技能

  • risk-based-testing - Black Hat deep dive
  • exploratory-testing-advanced - Green Hat exploration
  • context-driven-testing - Adapt to context

  • risk-based-testing - 黑帽深度分析
  • exploratory-testing-advanced - 绿帽探索
  • context-driven-testing - 适配场景

Anti-Patterns

反模式

❌ AvoidWhy✅ Instead
Mixing hatsConfuses thinkingOne hat at a time
Justifying Red HatKills intuitionState feelings only
Skipping hatsMisses insightsUse all six
RushingShallow analysis5 min minimum per hat

❌ 应避免原因✅ 正确做法
混合使用帽子混淆思考逻辑一次只使用一顶帽子
为红帽感受找理由扼杀直觉仅陈述感受即可
跳过部分帽子遗漏关键洞察使用全部六顶帽子
仓促完成分析不够深入每顶帽子至少预留5分钟

Remember

注意事项

Separate thinking modes for clarity. Each hat reveals different insights. Red Hat intuition often catches what Black Hat analysis misses.
Everyone wears all hats. This is parallel thinking, not role-based. The goal is comprehensive analysis, not debate.
分离思考模式以提升清晰度。 每顶帽子都能揭示不同的洞察。红帽的直觉往往能发现黑帽分析遗漏的问题。
所有人都要使用所有帽子。 这是平行思考,而非角色分工。目标是全面分析,而非争论。