[WIP] Add test plans and cases based on code and product design#2
Merged
Conversation
Copilot stopped work on behalf of
haochencheng due to an error
March 23, 2026 01:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.
Original prompt
The user asked to merge pull request #1 into the main branch of cliff-personal/Spec2Flow. Investigate the repository state and determine the correct action needed to complete the user's request. If direct merge is not possible in your environment, provide the necessary repository updates or guidance within a pull request or documented output to help complete the merge safely.
The following is the prior conversation context from the user's chat exploration (may be truncated):
User: 我想让openclaw 根据代码产品设计文档和 代码 设计测试方案,和测试case。然后根据测试case 自动测试 启动服务 在浏览器中模拟点击 测试功能 提交bug 我该怎么做呢
Assistant: 可以,但要拆成两层来做:
OpenClaw 官方文档明确支持一个受控浏览器,代理可以打开页面、读取页面、点击和输入;推荐流程是先
status/start,再snapshot,然后act(click/type/press),必要时再截图验证。它也支持独立的openclaw浏览器配置文件,适合做自动化验证。(docs.openclaw.ai)你想要的完整目标,其实可以这样落地
A. 先让它“读文档 + 读代码”,生成测试设计
你可以把这些材料给 OpenClaw:
然后给它一个明确任务提示词,例如:
这样它先输出的是测试设计结果,不是直接乱点页面。
B. 再让它“根据测试 case 执行自动化测试”
OpenClaw 的浏览器能力适合做这类事情:
OpenClaw 文档说明它的受控浏览器可执行打开、点击、输入、截图、快照等动作;登录类站点建议你手动在 openclaw 浏览器里登录,不要把账号密码直接交给模型。(docs.openclaw.ai)
你可以给它这样的执行提示词:
你提到的“自动启动服务 + 浏览器模拟点击 + 提交 bug”,建议按下面架构做
方案 1:OpenClaw 做总控,Playwright 做执行
这是最推荐的。
原因:
工作流:
这个方式比单纯让代理“临场点页面”更稳定。
方案 2:OpenClaw 直接控制浏览器逐条执行
这个方式也能做,但更适合:
因为浏览器直接操作虽然灵活,但大规模回归的稳定性、可复现性、可维护性通常不如 Playwright/Cypress 这类脚本化方案。OpenClaw 官方也强调浏览器工具是通过快照和动作接口做确定性控制。(docs.openclaw.ai)
“提交 bug” 怎么做
如果你要自动提交 bug,最好定义一个统一模板。OpenClaw 的 issue 指南建议至少包含:
这些字段很适合直接作为自动提单模板。(docs.openclaw.ai)
你可以让代理输出这样的 bug 草稿:
然后再把它接到:
实操上你该怎么开始
第一步:先准备这些输入
你至少要有:
第二步:让 OpenClaw 先只做“测试设计”
不要一开始就要求它“全自动提 bug”。
先让它输出:
这样你可以先审核一遍,避免生成的 case 很差。
第三步:再让它做“冒烟自动化”
只选最关键 5~10 条用例,比如:
这是最容易跑通的一批。
第四步:最后接入 bug 自动提交
建议先做成“两阶段”:
因为如果完全自动提交,容易制造很多重复/低质量 bug。
给你一个推荐的标准流程
最重要的建议
不要把“测试设计”和“自动执行”混成一句模糊指令。
你应该给 OpenClaw 下达两个独立任务:
任务 1:测试设计
任务 2:自动执行
这样成功率会高很多。
如果你要最短可执行版本,可以直接这样说
你可以直接对 OpenClaw 说:
现实中的限制你也要注意
This pull request was created from Copilot chat.
⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.