preview-test
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePreview Test
预览测试
Functionally test a deployed PR preview without assuming the host, deployment platform, app stack, tracker, or domain.
无需假设宿主、部署平台、应用栈、追踪器或域名,对已部署的PR预览进行功能测试。
References
参考资料
- — URL, PR number, readiness, vision, and verdict contract.
references/preview-detection.md - — host CLI fallback pattern.
references/vcs-host-detection.md
- — URL、PR编号、就绪状态、视觉验证和结论约定。
references/preview-detection.md - — 宿主CLI回退模式。
references/vcs-host-detection.md
Workflow
工作流程
-
Resolve inputs.
- Read if present.
.turkit.yaml - Resolve the preview URL via .
references/preview-detection.md - If the URL cannot be resolved, ask the operator for a URL or permission to skip. If skipped, output with a finding explaining that no preview URL was available.
status: "FAIL"
- Read
-
Resolve automation path.
- Prefer an available browser/Playwright MCP or host-native browser tool.
- If no browser automation tool is available, ask the operator to provide manual observations or skip. Do not invent results.
- Never require Claude-specific, Codex-specific, Cursor-specific, or Gemini-specific tooling for correctness.
-
Open the preview.
- Navigate to the resolved URL.
- Apply per
preview.wait_forwhen configured.references/preview-detection.md - If the preview is not reachable or readiness never appears, return with evidence.
FAIL
-
Run the requested scenario.
- Use the operator's prompt, PR description, ticket text, or changed surface to identify the flow to test.
- Exercise the smallest user-visible path that proves the feature works.
- Capture relevant console/runtime/network errors if the browser tool exposes them.
- Do not assume authentication, seed data, tenant, locale, or environment names. Ask when needed.
-
Analyze visual state.
- Apply per
preview.vision.references/preview-detection.md - If screenshot/vision is unavailable, continue with functional evidence and report the residual risk.
- Treat visual issues as findings only when tied to the requested behavior or obvious broken UI.
- Apply
-
Return the structured verdict. End the response with a JSON object matching the contract:json
{ "status": "PASS", "findings": [] }
-
解析输入。
- 若存在则读取该文件。
.turkit.yaml - 通过解析预览URL。
references/preview-detection.md - 若无法解析URL,询问操作者提供URL或是否允许跳过。若跳过,输出并附上说明:无可用预览URL。
status: "FAIL"
- 若存在
-
确定自动化路径。
- 优先使用可用的浏览器/Playwright MCP或宿主原生浏览器工具。
- 若无浏览器自动化工具可用,询问操作者提供手动观测结果或是否允许跳过。不得编造测试结果。
- 正确性验证绝不能依赖Claude专属、Codex专属、Cursor专属或Gemini专属工具。
-
打开预览。
- 导航至解析得到的URL。
- 若已配置,按照中的
references/preview-detection.md规则等待。preview.wait_for - 若预览无法访问或始终未显示就绪状态,返回并附上证据。
FAIL
-
运行请求的测试场景。
- 根据操作者的提示、PR描述、工单文本或变更内容确定要测试的流程。
- 执行最小的用户可见路径以验证功能正常工作。
- 若浏览器工具支持,捕获相关的控制台/运行时/网络错误。
- 不得假设身份验证、种子数据、租户、区域设置或环境名称。必要时询问操作者。
-
分析视觉状态。
- 按照中的
references/preview-detection.md规则进行视觉验证。preview.vision - 若截图/视觉验证不可用,继续使用功能证据并报告剩余风险。
- 仅当视觉问题与请求的行为相关或属于明显损坏的UI时,才将其列为问题点。
- 按照
-
返回结构化结论。 响应末尾需附上符合约定的JSON对象:json
{ "status": "PASS", "findings": [] }
Guardrails
约束规则
- No hardcoded preview hostnames, domains, tenants, stacks, or package managers.
- No project-specific assumptions.
- Do not run local build/test commands unless the operator explicitly asks; this skill tests the deployed preview.
- Do not mark if the preview could not be opened, the requested flow was not exercised, or required visual analysis was unavailable and essential.
PASS - Use with a clear configuration/tooling finding when the operator chooses not to provide a URL or manual evidence.
FAIL - Apply for operator-facing language/style, but keep the final JSON keys in English.
references/output-preferences.md
- 不得硬编码预览主机名、域名、租户、技术栈或包管理器。
- 不得做出项目特定的假设。
- 除非操作者明确要求,否则不得运行本地构建/测试命令;本技能仅测试已部署的预览环境。
- 若无法打开预览、未执行请求的测试流程,或必要的视觉分析不可用且至关重要时,不得标记为。
PASS - 当操作者选择不提供URL或手动证据时,返回并附上清晰的配置/工具问题说明。
FAIL - 面向操作者的语言/风格需遵循,但最终JSON的键需保留英文。
references/output-preferences.md