smoke-test
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSmoke 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 → skill
/agent-browser - UI/native app → project-specific UI testing skill or MCP tool if available, otherwise skill
/peekaboo - CLI tool → direct terminal execution
- Library with no entry point → report that smoke testing is not applicable and stop
根据项目类型和可用的Skill/MCP工具选择合适的测试方法。
- Web应用 → 使用 Skill
/agent-browser - UI/原生应用 → 若有项目专属UI测试Skill或MCP工具则使用,否则使用 Skill
/peekaboo - CLI工具 → 直接在终端执行
- 无入口点的类库 → 报告冒烟测试不适用并终止操作
Step 3: Plan Smoke Tests
步骤3:制定冒烟测试计划
Design targeted smoke tests based on the scope. Each test should:
- Exercise the specific feature or fix that was just implemented
- Verify the happy path works end-to-end
- Check one obvious edge case if applicable
Present the test plan to the user with before executing:
AskUserQuestionSmoke 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.
根据测试范围设计针对性的冒烟测试。每项测试需满足:
- 测试刚实现的特定功能或修复内容
- 验证正常流程能端到端运行
- 若适用,检查一个明显的边缘场景
在执行前,通过将测试计划告知用户:
AskUserQuestionSmoke 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 skill for full browser automation documentation.
/agent-browserCore verification loop per test:
- Navigate to the relevant page/route
- Snapshot and verify expected UI elements exist
- Interact (fill forms, click buttons, navigate)
- Re-snapshot and verify the expected outcome
- Record pass/fail
Close the browser session and stop the dev server when done.
若开发服务器未启动则启动它,等待服务器就绪。如需完整的浏览器自动化文档,可运行 Skill。
/agent-browser每项测试的核心验证流程:
- 导航至相关页面/路由
- 截图并验证预期的UI元素是否存在
- 进行交互操作(填写表单、点击按钮、页面导航等)
- 再次截图并验证是否达到预期结果
- 记录测试通过/失败结果
测试完成后关闭浏览器会话并停止开发服务器。
UI/Native App Path
UI/原生应用测试流程
Launch the app. Run the project-specific UI testing skill if available, otherwise run skill.
/peekabooCore verification loop per test:
- Capture the UI state
- Interact with the relevant controls
- Re-capture and verify the expected outcome
- Record pass/fail
启动应用。若有项目专属UI测试Skill则使用该Skill,否则运行 Skill。
/peekaboo每项测试的核心验证流程:
- 捕获当前UI状态
- 与相关控件进行交互
- 再次捕获状态并验证是否达到预期结果
- 记录测试通过/失败结果
CLI Path
CLI工具测试流程
Run commands directly.
Core verification loop per test:
- Run the command with expected inputs
- Check stdout/stderr for expected output
- Verify side effects (files created, data changed)
- Record pass/fail
直接运行命令。
每项测试的核心验证流程:
- 使用预期输入运行命令
- 检查标准输出/标准错误是否符合预期
- 验证副作用(如文件创建、数据变更等)
- 记录测试通过/失败结果
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 passedIf 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 skill on the smoke test report.
/investigate
- 始终清理环境:关闭浏览器会话,停止本Skill启动的开发服务器。
- 禁止修改代码:本Skill仅用于只读验证。若测试失败,只需报告失败情况,不得尝试修复问题。
- 若开发服务器启动失败,需报告错误并终止操作。
- 测试需严格围绕确定的范围进行,不得扩展为完整的应用测试。
- 如需诊断失败原因,可针对冒烟测试报告运行Skill。
/investigate