微算力 · API 导航与自营网关
API 接入 EN
未登录登录
🧪

五阶段编排,构建可维护的测试体系

Testing Workflow · v0.1.0
开发 安全 A 级 作者 wpank 公开目录收录
2.2k 下载 1 安装 7k 收藏 9 浏览

简介

Meta-skill 统筹测试全流程,协调测试模式、E2E 测试及代理,覆盖从基线发现到维护的完整测试生命周期

原始描述

Meta-skill that orchestrates comprehensive testing across a project by coordinating testing-patterns, e2e-testing, and testing agents. Use when setting up testing for a new project, improving coverage for an existing project, establishing a testing strategy, or verifying quality before a release.

通过你的 Agent 添加

安装目录:testing-workflow/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/testing-workflow/
Codex CLI~/.codex/skills/testing-workflow/
DeepSeek Harness~/.agents/skills/testing-workflow/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

中文使用说明 来自收录源

核心用法

Testing Workflow 是一个元级协调技能(Meta-Skill),本身不定义具体的测试代码模式,而是通过五阶段标准化流程,将用户的测试需求路由到专业化的子技能中。整个编排流程分为:发现基线(Discovery and Baseline)、策略选择(Strategy Selection)、测试实现(Implementation)、验证确认(Validation)和持续维护(Maintenance)。

在发现阶段,技能会指导用户扫描现有测试基础设施、测量覆盖率基线、识别未测试代码并分类现有测试。策略阶段则根据项目类型(Startup MVP、Production App、Library、Critical Infrastructure)设定差异化的覆盖率目标,并选择匹配的测试模式。实现阶段遵循测试金字塔原则:约 70% 单元测试、适当比例集成测试、少量但关键的 E2E 测试。验证阶段确保所有测试通过、覆盖率达标、无质量反模式。维护阶段建立覆盖率棘轮机制、脆弱测试处理策略和季度健康审计制度。

技能内置完整的路由表,可将具体需求定向到 testing-patterns、e2e-testing、clean-code、code-review、quality-gates、debugging 等下游技能。同时提供覆盖目标参考表、测试策略文档模板和质量门禁检查清单,形成可落地、可审计的测试工程体系。

显著优点

体系化而非碎片化:区别于单点测试技巧,该技能构建了从基线测量到持续维护的完整闭环,避免"头痛医头"的局部优化。

项目类型自适应:针对四种典型项目形态(MVP、生产应用、开源库、关键基础设施)设定差异化的覆盖目标,拒绝一刀切的虚荣指标。

质量门禁可操作:将抽象的"高质量"转化为 7 项可检查的门禁条件,包括测试执行时间预算、无跳过测试、无测试污染等工程实践细节。

元技能架构解耦:通过路由表将专业领域(E2E 模式、代码审查、调试技巧)分离到独立技能,用户可按需组合,避免单个技能过度膨胀。

文档即契约:强制要求产出《测试策略文档》并纳入版本控制,使测试策略成为团队共享的工程契约,而非个人隐性知识。

潜在缺点与局限性

依赖下游技能质量:作为纯协调层,实际测试能力完全取决于被引用的 testing-patterns、e2e-testing 等下游技能。若子技能质量不足,协调层无法弥补。

T3 来源可信度:作者为个人开发者(wpank),未建立组织级可信账号(T2)或基金会背书(T1),在长期维护承诺、社区支持广度方面存在不确定性。

无自动执行能力:纯文档型设计意味着所有流程需人工或外部 Agent 逐步执行,无法实现"一键生成完整测试套件"的自动化体验。

行业特定场景缺失:当前覆盖目标表未针对金融合规、医疗软件(FDA 验证)、汽车功能安全(ISO 26262)等强监管行业的特殊要求进行扩展。

执行成本认知不足:文档未充分警示五阶段完整流程的时间投入——对遗留大型项目,发现阶段可能耗时数周,易被团队低估。

适合的目标群体

  • 技术负责人/架构师:需要为团队建立标准化测试流程,统一代码审查中的测试 adequacy 标准
  • DevOps/质量工程师:负责 CI/CD 管道中测试门禁的配置与覆盖率趋势监控
  • 新项目启动团队:在从零搭建技术栈时,希望规避"先写功能后补测试"的债务陷阱
  • 遗留系统维护者:面对测试覆盖率极低的老项目,需要系统性的改进路径而非盲目补测试
  • 技术驱动型创业公司:在资源受限情况下,需要明确"MVP 阶段测试投入边界"的决策框架

使用风险

依赖链传播风险:虽然本技能本身安全(无可执行代码、无网络调用),但执行工作流时会加载多个下游技能。建议在使用前独立审查 testing-patterns 和 e2e-testing 等关键子技能的 CLS 认证报告,防止安全薄弱点沿依赖链传导。

版本漂移风险:个人开发者维护的项目可能存在更新不规律问题。建议采用版本锁定安装(指定 commit hash),并建立 Skill 更新审查流程,防止行为变更导致 CI 管道意外失败。

认知过载风险:五阶段完整流程对小型团队可能过于沉重。建议根据项目阶段选择性裁剪——MVP 可仅执行 Phase 1-3 的核心子集,避免流程成本超越实际价值。

覆盖率虚荣指标风险:文档虽已强调"有意义的覆盖优于百分比",但团队仍可能机械追求表格中的数字目标。建议在采纳前明确:覆盖率是必要非充分条件,断言质量和测试意图表达同样关键。

许可法律风险:当前 Skill 未指定 LICENSE,存在潜在的使用权限模糊性。建议在正式采用前联系作者确认许可条款,或优先选择已明确开源协议(MIT/Apache)的替代方案。

技能正文


name: testing-workflow description: Select and report verification for MiniMax Code changes using the repository's declared test suites and CI gates. Use when validating code, skills, documentation, build tooling or source-distribution changes.

Testing Workflow

Start with changed files, then identify the owning runtime, user entry point and final observable behavior. Read AGENTS.md, CONTRIBUTING.md and the applicable steps in scripts/verify.mjs.

Focused iteration

Vitest files belong to groups in test/vitest-suites.json; aliases and inclusion come from vitest.oss.config.mjs. Select an existing declared file for a focused run, for example:

pnpm exec vitest run --config vitest.oss.config.mjs packages/tui/test/unit/headless-contract.test.ts

Register new Vitest files in the suite declaration. Do not add hard-coded file lists to package scripts or the Vitest configuration. Vendored upstream test suites are outside this distribution's verification.

Scope Repository gate
Runtime, TUI, providers, plugins and ACP pnpm test:capabilities
Headless CLI and offline BYOK behavior pnpm test:byok
CLI artifact smoke pnpm test:smoke
Public artifact content pnpm test:artifact
TUI build-mode contract pnpm test:status-contract
Permission facade on macOS/Linux pnpm test:policy
Sandbox on macOS pnpm test:sandbox
Source-sync, workflow and release tools pnpm test:release-tools
npm release archive installation MCODE_RELEASE_TAG=vX.Y.Z MCODE_RELEASE_ARCHIVE=/path/to/package.tar.gz pnpm verify --profile package
TUI source and test lint pnpm lint:tui
Types and standalone build boundary pnpm typecheck, pnpm build, pnpm check:standalone
Published files and generated paths pnpm check:source, pnpm check:tsconfig

Artifact-dependent tests require a current pnpm build. Keep test state and reports outside the repository, using synthetic data and temporary directories.

The declared Vitest gate runner serializes test files on Windows to limit filesystem contention while retaining individual test deadlines. Run the owning gate for platform acceptance; a direct Vitest invocation uses its default worker count. Full-runtime smoke children have a 30-second Windows startup budget, matching ACP; lightweight help and validation checks retain 15 seconds.

Delivery verification

Run git diff --check and the relevant individual gates while editing. Review new or removed files before regenerating release/public-source.json with node scripts/source-inventory.mjs --write.

Before opening a PR, run pnpm verify on the reviewed commit with a clean tracked working tree. Source export reads committed HEAD and rejects uncommitted tracked changes; report that limitation if only iteration checks are possible.

Use pnpm verify --list to inspect the current platform's gates. Use the docs profile only when every changed path qualifies under scripts/ci-changes.mjs. Skills under .agents/skills, unknown paths and inventory changes require the full profile. The archive profile is for source-archive validation, not a way to bypass the clean-commit export requirement.

The package profile authenticates an npm release archive, installs it into a temporary npm prefix, and exercises its launcher, native dependencies and offline smoke/BYOK suites. It requires MCODE_RELEASE_TAG and MCODE_RELEASE_ARCHIVE and does not replace source validation. The release command commits matching root/TUI source versions before tagging. The release workflow rejects version mismatches and runs the full profile before package installation checks.

Performance coverage

Use CONTRIBUTING.md to classify the change. Add perf:full for performance optimizations, changes to history/token processing, storage, streaming or tool execution, and large runtime refactors. The label automatically selects the full suite and keeps it selected for later commits. Before merge, link a passing performance run with Suite: full for the latest head and intended base. Read Performance CI for evidence, limits and manual dispatch.

Manual evidence and reporting

For CLI behavior, exercise the built dist/cli.js and inspect stdout, stderr and exit code. For terminal presentation, exercise the relevant interaction when feasible. For provider or service changes, distinguish offline fixtures from a real endpoint call.

Report scope, commands and results, manual scenarios, and untested boundaries. Use PASS/FAIL/BLOCKED for actual checks; mark checks that did not run explicitly. Local macOS success does not establish Windows/Linux or live-service acceptance.

正文来自原始仓库, 版权归作者所有,许可:MIT。 权利人认为有不妥,可申请下架。

原始仓库

作者的项目地址:https://github.com/MiniMax-AI/minimax-code

标签

testingworkfloworchestrationcoveragequality-gatese2e-testingtest-strategyci-cd

同类 Skill