mcpField
T
testing-functional-suite

testing-functional-suite

github.com/wojons测试与质量339 次安装30 周前更新
代码仓库

关于 testing-functional-suite

面向开发和 QA 团队的测试技能,按单元、集成和系统测试组织功能验证,并提供 CI 与发布检查建议。

主要功能

  1. 01单元、集成和系统测试分层
  2. 02组件及 API 交互检查
  3. 03端到端工作流验证
  4. 04覆盖率与回归测试建议

适用场景

  1. 01发布前验证代码变更
  2. 02在 CI/CD 中安排测试阶段
  3. 03为 QA 审查准备功能验证

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/wojons/skills --skill testing-functional-suite

安装后在 Claude Code 中输入/testing-functional-suite确认已加载。

包含的文件

除 SKILL.md 外,安装时一起下载的参考资料和脚本。

README.md
references/
README.md
scripts/
example.sh

详细介绍

功能测试套件

运行全面的功能测试,涵盖单元测试、集成测试和系统测试,以验证应用功能。

何时使用

在以下情况下使用此技能:

  • 发布前进行完整的功能验证
  • 设置覆盖完整测试的 CI/CD 流水线
  • 系统地测试所有功能需求
  • 确保代码更改不会破坏现有功能
  • 为 QA 审查或用户验收测试做准备

我能做什么

  1. 单元测试层

    • 运行隔离的组件测试
    • 验证各个函数和方法
    • 实现高代码覆盖率(>80%)
    • 模拟外部依赖项
  2. 集成测试层

    • 测试组件之间的交互
    • 验证 API 契约和数据流
    • 测试数据库和外部服务集成
    • 检查跨边界的错误处理
  3. 系统测试层

    • 测试完整的端到端工作流
    • 验证功能需求
    • 测试用户界面和交互
    • 执行冒烟测试和回归测试

示例

# Run complete functional test suite
npm run test:functional           # Custom functional suite
npm run test                      # Default test command

# Run in CI/CD pipeline
npm run test:ci                   # CI-optimized testing
npm run test:coverage             # With coverage reporting

# Sequential execution
npm run test:unit && npm run test:integration && npm run test:e2e

# Parallel execution (if supported)
npm run test:all --parallel

输出格式

Functional Test Suite Results:
──────────────────────────────
Test Pyramid Execution:

Unit Tests (1,234 tests):
  ✅ Passed: 1,230 (99.7%)
  ⚠️ Skipped: 2
  ❌ Failed: 2
  📊 Coverage: 92%

Integration Tests (87 tests):
  ✅ Passed: 85 (97.7%)
  ❌ Failed: 2
    - Database connection pooling
    - Payment gateway timeout

System Tests (23 tests):
  ✅ Passed: 20 (87.0%)
  ❌ Failed: 3
    - User registration flow
    - Checkout process
    - Admin dashboard

Overall: 1,344 tests, 95.2% pass rate
Critical Paths: 15/18 passed (83.3%)
Recommendation: Fix system test failures before release

注意事项

  • 遵循测试金字塔原则:单元测试数量多,集成测试较少,系统测试更少
  • 每次提交都运行快速单元测试
  • 在拉取请求中运行集成测试
  • 发布前运行系统测试
  • 在 CI/CD 中自动执行功能测试
  • 持续跟踪测试指标和趋势
  • 使用测试标签对测试类型进行分类
  • 实施不稳定测试的检测和管理

评论

支持 Markdown