Skip to content

Latest commit

 

History

History
47 lines (34 loc) · 1.54 KB

File metadata and controls

47 lines (34 loc) · 1.54 KB
name run-smoke-tests
description 运行冒烟测试或最小端到端验证。用户要求 smoke test、跑一下关键路径、验证改动没有破坏主流程、改完跑测试时使用。

Run Smoke Tests

Use this skill to validate the smallest meaningful user path after a change.

Test Selection

Pick the narrowest check that can catch the likely regression:

  • Type-only change: npm run type-check
  • Shared TS behavior: npm run test:unit
  • Package behavior: npm run test --workspaces --if-present
  • Lint-sensitive edit: npm run lint
  • Android/native edit: cd android && ./gradlew assembleDebug --no-daemon
  • Mobile dev stack behavior: npm run dev:mobile-stack only when the user asks for interactive stack validation.

Use npm test only when broad validation is warranted; it can be slower than a focused check.

Workflow

  1. Identify the changed behavior and the smoke surface.
  2. Run prerequisites only when required.
  3. Run the focused command.
  4. If failing, inspect the first actionable failure and apply a minimal fix.
  5. Re-run the same command. Broaden only if the fix touches a shared path.

Guardrails

  • Prefer deterministic assertions over waiting or manual inspection.
  • Do not add Playwright, Detox, or other test dependencies without explicit approval.
  • Do not start an emulator unless explicitly requested.
  • Do not edit .env files.

Output

Keep the result short:

Smoke surface: <why this check was chosen>
Result: passed | failed | blocked
Command: <command>
Failure/fix: <only if relevant>