smoke-suite-debugging
Use this when smoke tests fail (binary/web assets, Playwright setup, server lifecycle, ports, env vars).
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
Quick checklist
- Ensure Playwright browsers exist
-
npm run playwright:install
- Ensure build artifacts are fresh
- Full build + smoke:
npm run smoke - Quick smoke (assumes you already built):
npm run test:smoke:quick
- Run one smoke test first
- By name:
-
npm run test:smoke:quick -- -t "<substring>"
-
- By file:
-
npm run test:smoke:quick -- smoke/tests/<suite>.smoke.spec.ts
-
Common failure modes
-
“Binary not found”
- Smoke resolves the binary from
target/release/lotarby default. - Fix: run
npm run build, or setLOTAR_BINARY_PATH(orLOTAR_BIN) to a custom path.
- Smoke resolves the binary from
-
“Port already in use”
- The harness normally auto-picks a free port; failures may indicate a stuck server.
- Re-run with a single test in-band (
--runInBand) so it’s easier to spot lifecycle issues.
-
“SSE readiness / flaky waits”
- Smoke uses
LOTAR_SSE_READYhooks and server heartbeats; seedocs/help/serve.mdfor the testing aids.
- Smoke uses
Useful env vars
-
LOTAR_BINARY_PATH/LOTAR_BIN: override the binary used by smoke. -
LOTAR_TASKS_DIR,LOTAR_HOME: smoke sets these per-test (seesmoke/helpers/workspace.ts). -
RUST_LOG=debugorLOTAR_DEBUG=1: can help when diagnosing server/CLI behavior (keep logs free of secrets/PII).
Debugging approach
- Prefer
npx vitest watch --config smoke/vitest.config.ts --runInBandfor a tight loop. - If needed, temporarily enable inherited stdio in the smoke helpers while debugging (but keep changes scoped and revert before finalizing).
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-01-20
- 索引更新时间
- 2026-01-26
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!