[分享] AutoQA-Agent:用 Markdown 写验收用例, AI + Playwright 跑起来,跑通还能导出成 Playwright Test

2025 年 12 月 19 日
 terryso

最近在折腾“验收自动化”时一个反复踩的坑:

所以做了个小工具:AutoQA-Agent(开源 CLI )。核心思路是 Docs-as-Tests (文档即测试)


TL;DR


快速上手

git clone https://github.com/terryso/AutoQA-Agent.git
cd AutoQA-Agent
npm install
npm run build
npm link   # 可选,全局使用 autoqa

autoqa init

# 跑一个示例(仓库里有 SauceDemo 用例)
autoqa run specs/saucedemo-01-login.md --url https://www.saucedemo.com/

# 本地观察执行过程
autoqa run specs/saucedemo-01-login.md --url https://www.saucedemo.com/ --debug

Markdown 用例长啥样(示例)

# Login

## Preconditions
- Test account exists

## Steps
1. Navigate to /login
2. Verify the login form is visible
3. Fill the username field with standard_user
4. Fill the password field with secret_sauce
5. Click the "Login" button
6. Verify the user is redirected to dashboard

说明:


稳定性思路(简单说)


失败排查/产物(我自己最想要的部分)

每次运行会落盘:

.autoqa/runs/<runId>/
├── run.log.jsonl
├── ir.jsonl
├── screenshots/
├── snapshots/
└── traces/

目前状态


想听听大家的反馈(求喷/求建议)

我比较关心的问题:

Repo: https://github.com/terryso/AutoQA-Agent

欢迎提 Issue / PR 。

1874 次点击
所在节点    分享创造
0 条回复

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/1179947

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX