smoke-test

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Smoke Test

冒烟测试

Launch the app and hands-on verify that changes work. Not unit/integration tests.
启动应用并通过交互手动验证更改是否生效。不适用于单元/集成测试。

Step 1: Determine Scope

步骤1:确定测试范围

If the user specifies what to test, use that. Otherwise, derive scope from conversation context. Extract:
  • What changed — feature, fix, or refactor description
  • Where it lives — files, routes, commands, UI screens affected
  • Expected behavior — what should be observable when the changes work
如果用户指定了测试内容,则按用户要求执行。否则从对话语境中推导测试范围。需要提取以下信息:
  • 变更内容——新功能、修复内容或重构说明
  • 影响范围——受影响的文件、路由、命令、UI界面
  • 预期行为——变更生效后可观察到的结果

Step 2: Determine Testing Approach

步骤2:确定测试方法

Examine the project type and available skills/MCP tools to choose the right approach.
  • Web app
    /agent-browser
    skill
  • UI/native app → project-specific UI testing skill or MCP tool if available, otherwise
    /peekaboo
    skill
  • CLI tool → direct terminal execution
  • Library with no entry point → report that smoke testing is not applicable and stop
根据项目类型和可用的Skill/MCP工具选择合适的测试方法。
  • Web应用 → 使用
    /agent-browser
    Skill
  • UI/原生应用 → 若有项目专属UI测试Skill或MCP工具则使用,否则使用
    /peekaboo
    Skill
  • CLI工具 → 直接在终端执行
  • 无入口点的类库 → 报告冒烟测试不适用并终止操作

Step 3: Plan Smoke Tests

步骤3:制定冒烟测试计划

Design targeted smoke tests based on the scope. Each test should:
  1. Exercise the specific feature or fix that was just implemented
  2. Verify the happy path works end-to-end
  3. Check one obvious edge case if applicable
Present the test plan to the user with
AskUserQuestion
before executing:
Smoke Test Plan:
1. [Test description] — verifies [what]
2. [Test description] — verifies [what]
3. [Test description] — verifies [what]

Approach: [agent-browser / peekaboo / terminal]
Dev server command: [command]
Wait for approval before executing.
根据测试范围设计针对性的冒烟测试。每项测试需满足:
  1. 测试刚实现的特定功能或修复内容
  2. 验证正常流程能端到端运行
  3. 若适用,检查一个明显的边缘场景
在执行前,通过
AskUserQuestion
将测试计划告知用户:
Smoke Test Plan:
1. [Test description] — verifies [what]
2. [Test description] — verifies [what]
3. [Test description] — verifies [what]

Approach: [agent-browser / peekaboo / terminal]
Dev server command: [command]
等待用户批准后再执行。

Step 4: Execute

步骤4:执行测试

Web App Path

Web应用测试流程

Start the dev server if not already running. Wait for it to be ready. Run
/agent-browser
skill for full browser automation documentation.
Core verification loop per test:
  1. Navigate to the relevant page/route
  2. Snapshot and verify expected UI elements exist
  3. Interact (fill forms, click buttons, navigate)
  4. Re-snapshot and verify the expected outcome
  5. Record pass/fail
Close the browser session and stop the dev server when done.
若开发服务器未启动则启动它,等待服务器就绪。如需完整的浏览器自动化文档,可运行
/agent-browser
Skill。
每项测试的核心验证流程:
  1. 导航至相关页面/路由
  2. 截图并验证预期的UI元素是否存在
  3. 进行交互操作(填写表单、点击按钮、页面导航等)
  4. 再次截图并验证是否达到预期结果
  5. 记录测试通过/失败结果
测试完成后关闭浏览器会话并停止开发服务器。

UI/Native App Path

UI/原生应用测试流程

Launch the app. Run the project-specific UI testing skill if available, otherwise run
/peekaboo
skill.
Core verification loop per test:
  1. Capture the UI state
  2. Interact with the relevant controls
  3. Re-capture and verify the expected outcome
  4. Record pass/fail
启动应用。若有项目专属UI测试Skill则使用该Skill,否则运行
/peekaboo
Skill。
每项测试的核心验证流程:
  1. 捕获当前UI状态
  2. 与相关控件进行交互
  3. 再次捕获状态并验证是否达到预期结果
  4. 记录测试通过/失败结果

CLI Path

CLI工具测试流程

Run commands directly.
Core verification loop per test:
  1. Run the command with expected inputs
  2. Check stdout/stderr for expected output
  3. Verify side effects (files created, data changed)
  4. Record pass/fail
直接运行命令。
每项测试的核心验证流程:
  1. 使用预期输入运行命令
  2. 检查标准输出/标准错误是否符合预期
  3. 验证副作用(如文件创建、数据变更等)
  4. 记录测试通过/失败结果

Step 5: Report

步骤5:生成测试报告

Present a summary:
Smoke Test Results:
- [PASS] Test 1: description
- [FAIL] Test 2: description — [what went wrong]
- [PASS] Test 3: description

Overall: X/Y passed
If any test failed, include the relevant snapshot, screenshot, or output showing the failure.
生成测试摘要:
Smoke Test Results:
- [PASS] Test 1: description
- [FAIL] Test 2: description — [what went wrong]
- [PASS] Test 3: description

Overall: X/Y passed
若有测试失败,需附上相关的快照、截图或输出信息以说明失败情况。

Rules

规则

  • Always clean up: close browser sessions, stop dev servers started by this skill.
  • Never modify code. This skill is read-only verification. If a test fails, report the failure — do not attempt to fix it.
  • If the dev server fails to start, report the error and stop.
  • Keep tests focused on the determined scope. Do not regress into full app testing.
  • To diagnose failures, run the
    /investigate
    skill on the smoke test report.
  • 始终清理环境:关闭浏览器会话,停止本Skill启动的开发服务器。
  • 禁止修改代码:本Skill仅用于只读验证。若测试失败,只需报告失败情况,不得尝试修复问题。
  • 若开发服务器启动失败,需报告错误并终止操作。
  • 测试需严格围绕确定的范围进行,不得扩展为完整的应用测试。
  • 如需诊断失败原因,可针对冒烟测试报告运行
    /investigate
    Skill。