requirements-analysis

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

需求分析(中文版)

Requirements Analysis (Chinese Version)

英文版: 见技能
requirements-analysis-en
提示词见本目录
prompts/requirements-analysis.md
English Version: Refer to the skill
requirements-analysis-en
.
Prompt template can be found in
prompts/requirements-analysis.md
in this directory.

何时使用

When to Use

  • 用户提到「需求分析」「requirements analysis」「测试点识别」
  • 需要从需求文档中提取测试点
  • 触发示例:「分析这个需求的测试点」「识别需求中的边界条件」
  • When the user mentions "requirements analysis", "requirements analysis", or "test point identification"
  • Need to extract test points from requirement documents
  • Trigger Examples: "Analyze test points for this requirement", "Identify boundary conditions in the requirement"

输出格式选项

Output Format Options

本技能默认输出为 Markdown。若需其他格式,请在需求末尾明确说明。
This skill outputs in Markdown by default. If other formats are needed, please specify clearly at the end of your request.

如何使用

How to Use

  1. 打开本目录
    prompts/
    下对应提示词文件,复制虚线以下内容。
  2. 附加你的需求与上下文(业务流程、环境、约束、验收标准)。
  3. 若需非 Markdown 输出,在末尾追加
    output-formats.md
    中的请求句。
  1. Open the corresponding prompt file under the
    prompts/
    directory in this folder, and copy the content below the dashed line.
  2. Attach your requirements and context (business processes, environment, constraints, acceptance criteria).
  3. If non-Markdown output is required, append the request sentence from
    output-formats.md
    at the end.

参考文件

Reference Files

  • prompts/requirements-analysis.md — 需求分析提示词
  • output-formats.md — 格式说明
  • prompts/requirements-analysis.md — Requirements analysis prompt template
  • output-formats.md — Format specifications

代码示例 | Code Examples

Code Examples

  1. 需求分析模板(计划中) - 需求分析示例和模板
  1. Requirements Analysis Template (In Progress) - Requirements analysis examples and templates

常见误区 | Common Pitfalls

Common Pitfalls

  • 只看表面功能 → ✅ 深入分析隐含需求和边界条件
  • 忽略非功能需求 → ✅ 关注性能、安全、可用性等
  • 遗漏异常场景 → ✅ 识别所有可能的异常情况
  • 缺少优先级 → ✅ 标记测试点的优先级
  • Only focus on surface-level functions → ✅ Conduct in-depth analysis of implicit requirements and boundary conditions
  • Ignore non-functional requirements → ✅ Focus on performance, security, usability, etc.
  • Miss exception scenarios → ✅ Identify all possible exception cases
  • Lack of prioritization → ✅ Mark the priority of test points

最佳实践 | Best Practices

Best Practices

1. 需求分析框架(5W1H)

1. Requirements Analysis Framework (5W1H)

markdown
undefined
markdown
undefined

What(是什么)

What (What it is)

  • 功能描述
  • 业务目标
  • 用户价值
  • Function description
  • Business objectives
  • User value

Who(谁使用)

Who (Who uses it)

  • 目标用户
  • 用户角色
  • 权限要求
  • Target users
  • User roles
  • Permission requirements

When(何时)

When (When to use)

  • 触发条件
  • 时间约束
  • 频率要求
  • Trigger conditions
  • Time constraints
  • Frequency requirements

Where(在哪里)

Where (Where to use)

  • 使用场景
  • 环境要求
  • 平台限制
  • Usage scenarios
  • Environment requirements
  • Platform restrictions

Why(为什么)

Why (Why it's needed)

  • 业务原因
  • 问题解决
  • 价值体现
  • Business reasons
  • Problem resolution
  • Value realization

How(如何实现)

How (How to implement)

  • 实现方式
  • 技术方案
  • 交互流程
undefined
  • Implementation methods
  • Technical solutions
  • Interaction processes
undefined

2. 测试点识别

2. Test Point Identification

测试点类型
  • 功能测试点
  • 界面测试点
  • 数据测试点
  • 性能测试点
  • 安全测试点
  • 兼容性测试点
Test Point Types:
  • Functional test points
  • UI test points
  • Data test points
  • Performance test points
  • Security test points
  • Compatibility test points

3. 边界条件分析

3. Boundary Condition Analysis

  • 输入边界
  • 输出边界
  • 时间边界
  • 数量边界
  • 权限边界
  • Input boundaries
  • Output boundaries
  • Time boundaries
  • Quantity boundaries
  • Permission boundaries

故障排除 | Troubleshooting

Troubleshooting

问题1:需求不清晰

Problem 1: Unclear Requirements

解决方案
  1. 列出疑问点
  2. 与产品经理沟通
  3. 记录澄清结果
  4. 更新需求文档
Solutions:
  1. List out unclear points
  2. Communicate with product managers
  3. Record clarification results
  4. Update requirement documents

问题2:测试点遗漏

Problem 2: Missing Test Points

解决方案: 使用检查清单:
  • 正常场景
  • 异常场景
  • 边界值
  • 权限验证
  • 数据验证
  • 性能要求
  • 安全要求
相关技能: test-case-writing、test-strategy、functional-testing。
Solutions: Use the checklist:
  • Normal scenarios
  • Exception scenarios
  • Boundary values
  • Permission verification
  • Data verification
  • Performance requirements
  • Security requirements
Related Skills: test-case-writing, test-strategy, functional-testing.

目标受众

Target Audience

  • 在真实项目中执行该测试域工作的 QA 与开发人员
  • 需要结构化、可复用测试交付物的测试负责人
  • 需要快速生成可落地测试产出的 AI 使用者
  • QA and developers who perform work in this testing domain in real projects
  • Test leads who need structured, reusable test deliverables
  • AI users who need to quickly generate actionable test outputs

不适用场景

Unsuitable Scenarios

  • 无测试范围上下文的纯线上应急处置
  • 需要法律/合规最终裁定但缺少专家复核的决策
  • 缺少最小输入(范围、环境、期望行为)的请求
  • Pure online emergency response without test scope context
  • Decisions requiring legal/compliance final ruling but lacking expert review
  • Requests missing minimum inputs (scope, environment, expected behavior)

关键成功因素

Key Success Factors

  • 先明确范围、环境与验收标准,再生成测试内容
  • 生成结果必须结合真实系统约束做二次校验
  • 保持产物可追踪(需求 -> 测试点 -> 缺陷 -> 决策)
  • Clarify scope, environment, and acceptance criteria first before generating test content
  • The generated results must be re-validated against real system constraints
  • Maintain traceability of deliverables (Requirements -> Test Points -> Defects -> Decisions)

输出模板与解析脚本

Output Templates and Parsing Scripts

  • 模板目录:
    output-templates/
    • template-word.md
      (Word 友好结构)
    • template-excel.tsv
      (Excel 可直接粘贴)
    • template-xmind.md
      (XMind 结构化大纲)
    • template-json.json
    • template-csv.csv
    • template-markdown.md
  • 解析脚本目录:
    scripts/
    • 解析通用:
      parse_output_formats.py
    • 解析按格式:
      parse_word.py
      parse_excel.py
      parse_xmind.py
      parse_json.py
      parse_csv.py
      parse_markdown.py
    • 转换通用:
      convert_output_formats.py
    • 转换按格式:
      convert_to_word.py
      convert_to_excel.py
      convert_to_xmind.py
      convert_to_json.py
      convert_to_csv.py
      convert_to_markdown.py
    • 批量转换:
      batch_convert_templates.py
      (批量输出到
      artifacts/
示例:
bash
python3 scripts/parse_json.py output-templates/template-json.json
python3 scripts/parse_markdown.py output-templates/template-markdown.md
python3 scripts/convert_to_json.py output-templates/template-markdown.md
python3 scripts/convert_output_formats.py output-templates/template-json.json --to csv
python3 scripts/batch_convert_templates.py --skip-same
  • Template Directory:
    output-templates/
    • template-word.md
      (Word-friendly structure)
    • template-excel.tsv
      (Can be directly pasted into Excel)
    • template-xmind.md
      (XMind structured outline)
    • template-json.json
    • template-csv.csv
    • template-markdown.md
  • Parsing Script Directory:
    scripts/
    • General parsing:
      parse_output_formats.py
    • Format-specific parsing:
      parse_word.py
      ,
      parse_excel.py
      ,
      parse_xmind.py
      ,
      parse_json.py
      ,
      parse_csv.py
      ,
      parse_markdown.py
    • General conversion:
      convert_output_formats.py
    • Format-specific conversion:
      convert_to_word.py
      ,
      convert_to_excel.py
      ,
      convert_to_xmind.py
      ,
      convert_to_json.py
      ,
      convert_to_csv.py
      ,
      convert_to_markdown.py
    • Batch conversion:
      batch_convert_templates.py
      (Batch output to
      artifacts/
      )
Example:
bash
python3 scripts/parse_json.py output-templates/template-json.json
python3 scripts/parse_markdown.py output-templates/template-markdown.md
python3 scripts/convert_to_json.py output-templates/template-markdown.md
python3 scripts/convert_output_formats.py output-templates/template-json.json --to csv
python3 scripts/batch_convert_templates.py --skip-same