测试审查
- 作者仓库星标 672
- 许可证 MIT
- 作者更新于 实时读取
- 作者仓库 kiro
- 领域
- 工程开发
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 94 / 100 · 已通过审计
- 作者 / 版本 / 许可
- @jasonkneen · MIT
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 底层运行要求
- 无特殊要求
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 网络行为
- 仅限本地
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: quality-assurance
description: Comprehensive testing and validation strategies for spec-driven development. Learn phase-specifi…
category: 工程开发
runtime: 无特殊运行时
---
# quality-assurance 输出预览
## PART A: 任务判断
- 适用问题:代码实现、重构、调试或代码审查。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“When to Use This Skill / Core Principles / Phase-Specific Validation”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于代码实现、重构、调试或代码审查,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“When to Use This Skill / Core Principles / Phase-Specific Validation”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、执行终端命令、主要在本地完成、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文没有稳定的斜杠命令要求。安装验证后通常全局生效,直接在对话里点名这个 Skill 并描述任务即可。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件、执行终端命令。
先用一个小任务确认它会围绕“When to Use This Skill / Core Principles / Phase-Specific Validation”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: quality-assurance
description: Comprehensive testing and validation strategies for spec-driven development. Learn phase-specifi…
category: 工程开发
source: jasonkneen/kiro
---
# quality-assurance
## 什么时候使用
- quality-assurance 是一个工程开发方向的技能,扩展 Agent 在写代码、做 review、跑测试这类场景下的能力 适合处理工程开发场景下的代码实现、调试、重构、测试或代码审查,核心价值是把输入、判断、执行、验证和交付边…
- 面向代码实现、重构、调试或代码审查,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「When to Use This Skill / Core Principles / Phase-Specific Validation」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件、执行终端命令;主要在本地完成;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "quality-assurance" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> When to Use This Skill / Core Principles / Phase-Specific Validation
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> 无特殊运行时 | 读取文件、写入/修改文件、执行终端命令 | 主要在本地完成
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} Quality Assurance
Ensure quality throughout the spec-driven development process with validation techniques, quality gates, and testing strategies.
When to Use This Skill
Use quality assurance practices when:
- Completing any spec phase (requirements, design, tasks)
- Transitioning between phases
- Implementing features from specs
- Reviewing completed work
- Establishing team quality standards
Core Principles
- Requirements-Driven Testing: Every test traces to a requirement
- Phase-Appropriate Validation: Different techniques for each phase
- Continuous Quality: Checks throughout development
- Automated Where Possible: Reduce manual effort
- Fast Feedback: Catch issues early
Phase-Specific Validation
Requirements Phase Validation
Quality Checklist:
- All user stories have acceptance criteria
- Requirements are unambiguous and specific
- Each requirement can be validated/tested
- EARS format used consistently
- Requirements link to business objectives
- No conflicting requirements
Review Process:
- Self Review: Author checks completeness
- Stakeholder Review: Business validates requirements
- Technical Review: Team assesses feasibility
- Approval: Formal sign-off before design
Validation Techniques:
- Scenario Walkthroughs: Step through user journeys
- Edge Case Analysis: Identify boundary conditions
- Conflict Detection: Check for contradictions
- Completeness Analysis: Ensure all needs covered
Design Phase Validation
Quality Checklist:
- Design addresses all requirements
- Scalability considerations documented
- Maintainability assessed
- Security addressed
- Performance requirements considered
- External integrations defined
Review Process:
- Architecture Review: Senior team validates design
- Security Review: Security implications assessed
- Performance Review: Performance characteristics evaluated
- Integration Review: External dependencies validated
Validation Techniques:
- Design Walkthroughs: Step through system interactions
- Threat Modeling: Identify security vulnerabilities
- Performance Modeling: Estimate system performance
- Dependency Analysis: Map external requirements
Tasks Phase Validation
Quality Checklist:
- Each task has clear deliverables
- Task sequence is logical
- All design elements covered
- Each task can be validated
- Tasks appropriately sized (2-4 hours)
- Dependencies clearly defined
Review Process:
- Completeness Review: All design elements have tasks
- Sequencing Review: Task order is logical
- Scope Review: Tasks are appropriately sized
- Dependency Review: Dependencies clear
Quality Gates
Requirements Phase Exit Criteria
- All user stories follow proper format
- Acceptance criteria use EARS format
- Requirements are testable and measurable
- No conflicting requirements
- Stakeholders have approved
- Edge cases documented
Design Phase Exit Criteria
- Architecture addresses all requirements
- Non-functional requirements addressed
- External dependencies identified
- Data models clearly defined
- Error handling documented
- Security considerations addressed
- Technical review completed
Tasks Phase Exit Criteria
- All design elements have tasks
- Tasks properly sequenced
- Each task is actionable
- Requirements references included
- Test approach defined
- Task breakdown reviewed
Task-Level Quality Gates
Before Starting:
- Task requirements understood
- Test strategy defined
- Dependencies available
- Environment ready
During Implementation:
- Code follows standards
- Tests written alongside code
- Coverage meets thresholds (80%+)
- No critical vulnerabilities
Before Marking Complete:
- All tests pass
- Code review completed
- Documentation updated
- Requirements validated
Testing Strategies
Test Pyramid
/\
/ \ E2E Tests (10%)
/____\ Integration Tests (20%)
/ \
/________\ Unit Tests (70%)
Unit Testing
- Fast execution (< 1 second per test)
- Test individual functions/classes
- Mock external dependencies
- Target 80%+ coverage
Integration Testing
- Test component interactions
- Use real dependencies where practical
- Validate API contracts
- Test critical workflows
End-to-End Testing
- Test complete user journeys
- Production-like environment
- Focus on critical business flows
- Minimal but comprehensive
Test-Driven Development
For each task:
- Write tests first based on acceptance criteria
- Run tests - verify they fail (red)
- Write code - minimal to pass tests (green)
- Refactor - improve while keeping tests green
- Validate - ensure requirements satisfied
Quality Metrics
Code Quality
- Line Coverage: % of code lines executed
- Branch Coverage: % of code branches tested
- Cyclomatic Complexity: Code complexity
- Technical Debt: Accumulated issues
Testing Effectiveness
- Test Pass Rate: % of tests passing
- Execution Time: Time to run tests
- Defect Detection Rate: Bugs found by tests vs production
- Test Maintenance: Time spent maintaining tests
Common Quality Issues
Flaky Tests
Symptoms: Tests pass/fail inconsistently Solutions:
- Identify timing dependencies
- Use proper wait conditions
- Isolate test data
- Fix race conditions
Slow Test Suites
Symptoms: Tests take too long Solutions:
- Parallelize execution
- Optimize database operations
- Use test doubles for external services
- Profile and optimize slow tests
Low Coverage
Symptoms: Insufficient code coverage Solutions:
- Add tests for uncovered paths
- Focus on critical business logic
- Use mutation testing
- Set coverage gates in CI
Test Maintenance Burden
Symptoms: Tests require frequent updates Solutions:
- Improve test design
- Use page object patterns for UI
- Reduce coupling to implementation
- Regular test refactoring
Validation Checklists
Requirements Validation
## Requirements Review
**Completeness:**
- [ ] All user roles addressed
- [ ] Happy path scenarios covered
- [ ] Edge cases documented
- [ ] Error cases handled
- [ ] Business rules captured
**Clarity:**
- [ ] Precise language used
- [ ] No ambiguous terms
- [ ] Technical jargon avoided
- [ ] Behaviors are specific
**Testability:**
- [ ] Each requirement verifiable
- [ ] Success criteria observable
- [ ] Inputs/outputs specified
Design Validation
## Design Review
**Architecture:**
- [ ] Requirements addressed
- [ ] Components well-defined
- [ ] Interfaces specified
- [ ] Data flow documented
**Quality Attributes:**
- [ ] Performance considered
- [ ] Security addressed
- [ ] Scalability planned
- [ ] Maintainability assessed
**Risks:**
- [ ] Single points of failure identified
- [ ] Bottlenecks documented
- [ ] Mitigations planned
Implementation Validation
## Implementation Review
**Code Quality:**
- [ ] Follows standards
- [ ] Well-documented
- [ ] Tests included
- [ ] No security issues
**Requirements:**
- [ ] All criteria met
- [ ] Edge cases handled
- [ ] Error handling complete
**Integration:**
- [ ] Works with existing code
- [ ] APIs functioning
- [ ] Performance acceptable
Best Practices
Testing Best Practices
- Write tests first when possible
- Each test verifies one thing
- Use descriptive test names
- Maintain test independence
- Keep tests up-to-date
Quality Assurance Best Practices
- Find issues early (shift left)
- Automate everything possible
- Use metrics to drive improvements
- Make quality everyone's responsibility
- Continuous learning and improvement
Process Integration
- Link tests to requirements
- Provide quick feedback
- Focus testing on high-risk areas
- Keep documentation current
- Integrate tools with workflow
Quick Reference
Phase Transition Questions:
- Requirements → Design: "Does design address all requirements?"
- Design → Tasks: "Do tasks cover all design elements?"
- Tasks → Implementation: "Does code satisfy task specifications?"
Quality Gate Questions:
- "Is this testable and measurable?"
- "Have we considered what could go wrong?"
- "Would another developer understand this?"
- "Does this meet our standards?"
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核