dsh-uitest 2.1.1 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -23
- package/lib/ab.mjs +760 -0
- package/lib/browser-ab.mjs +1 -1
- package/package.json +9 -1
- package/skills/uitest/SKILL.md +11 -11
- package/skills/uitest/references/cases-xlsx.md +11 -11
- package/skills/uitest/references/convert-knowledge.md +32 -32
- package/skills/uitest/references/flows.md +1 -1
- package/skills/uitest/references/results-report.md +3 -3
- package/skills/uitest/references/troubleshooting.md +9 -9
- package/studio/accounts.mjs +1 -0
- package/studio/preview/index.html +0 -88
- package/studio/preview/sample.json +0 -2215
- package/studio/preview/server.mjs +0 -498
- package/studio/test/accounts.test.mjs +0 -90
- package/studio/test/agent-live.test.mjs +0 -53
- package/studio/test/browser-profile.test.mjs +0 -85
- package/studio/test/documents.test.mjs +0 -305
- package/studio/test/export.test.mjs +0 -196
- package/studio/test/feedback.test.mjs +0 -199
- package/studio/test/host.test.mjs +0 -723
- package/studio/test/knowledge.test.mjs +0 -450
- package/studio/test/live-proxy.test.mjs +0 -161
- package/studio/test/live.test.mjs +0 -43
- package/studio/test/queue.test.mjs +0 -157
- package/studio/test/studio.test.mjs +0 -1462
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
**这是什么**:一个 DSH bundle 插件,同时提供 Web 工作台、7 个模型工具、一条 CLI 和一套单测。它不是单元测试框架,也不替代接口测试。
|
|
8
8
|
|
|
9
|
-
**和旧版的关系**:产品层与 UI 已重写;agent-browser 会话、flow DSL、seed 配方、backfill、knowledge 等引擎层保留。旧 CLI
|
|
9
|
+
**和旧版的关系**:产品层与 UI 已重写;agent-browser 会话、flow DSL、seed 配方、backfill、knowledge 等引擎层保留。旧 CLI bin/uitest.mjs 仍可用于 flow 只读回归与报告。
|
|
10
10
|
|
|
11
11
|
## 1. 主线
|
|
12
12
|
|
|
@@ -36,10 +36,10 @@ flow 不是执行前提。自然语言用例才是事实来源。
|
|
|
36
36
|
|
|
37
37
|
本地视觉预览:
|
|
38
38
|
|
|
39
|
-
node
|
|
39
|
+
node studio/preview/server.mjs
|
|
40
40
|
# 打开 http://127.0.0.1:4173/
|
|
41
41
|
|
|
42
|
-
预览使用
|
|
42
|
+
预览使用 studio/preview/sample.json,不访问真实项目。
|
|
43
43
|
|
|
44
44
|
## 3. Host API
|
|
45
45
|
|
|
@@ -87,20 +87,20 @@ flow 不是执行前提。自然语言用例才是事实来源。
|
|
|
87
87
|
|
|
88
88
|
## 5. CLI
|
|
89
89
|
|
|
90
|
-
node
|
|
91
|
-
node
|
|
92
|
-
node
|
|
93
|
-
node
|
|
94
|
-
node
|
|
95
|
-
node
|
|
96
|
-
node
|
|
97
|
-
node
|
|
98
|
-
node
|
|
99
|
-
node
|
|
100
|
-
node
|
|
101
|
-
node
|
|
102
|
-
|
|
103
|
-
node
|
|
90
|
+
node bin/studio.mjs import 文件或目录 --project .
|
|
91
|
+
node bin/studio.mjs cases --project . --mode agent
|
|
92
|
+
node bin/studio.mjs plan --project . --case TC-FP001-01
|
|
93
|
+
node bin/studio.mjs batch create --project . --flow-only --workers 3
|
|
94
|
+
node bin/studio.mjs batch create --project . --case TC-FP001-01 --workers 3
|
|
95
|
+
node bin/studio.mjs batch run --project . --id <batchId>
|
|
96
|
+
node bin/studio.mjs batch status --project . --id <batchId>
|
|
97
|
+
node bin/studio.mjs batch backfill --project . --id <batchId> --apply
|
|
98
|
+
node bin/studio.mjs run-case <caseId> --project .
|
|
99
|
+
node bin/uitest.mjs agent-session knowledge --id <sessionId> --query "列表未加载" --project . --json
|
|
100
|
+
node bin/studio.mjs flows --project .
|
|
101
|
+
node bin/studio.mjs knowledge --project .
|
|
102
|
+
node scripts/knowledge-central-sync.mjs --project .
|
|
103
|
+
node bin/studio.mjs doctor --project .
|
|
104
104
|
|
|
105
105
|
纯 CLI 只能跑 flow 泳道;Agent 泳道需要 DSH Host 的 subagents/agents 服务。没有活跃父 Agent 时,Host 会通过 sessionController 创建并复用「测试工作室 Agent 执行」会话,再启动测试子 Agent。CLI 会把 Agent 用例标为阻塞,不会卡住其它用例。只想跑 flow 时加 --flow-only。
|
|
106
106
|
|
|
@@ -134,13 +134,13 @@ flow 不是执行前提。自然语言用例才是事实来源。
|
|
|
134
134
|
|
|
135
135
|
## 5.1.2 中心知识库(Graphiti)
|
|
136
136
|
|
|
137
|
-
-
|
|
138
|
-
-
|
|
137
|
+
- 中心知识库是本仓库的 `test/knowledge-poc`(Graphiti + Neo4j),不随插件包分发;健康检查 `curl http://127.0.0.1:8000/health`。
|
|
138
|
+
- 启动:`cd test/knowledge-poc && docker compose up -d --build`;默认地址 `http://127.0.0.1:8000`,Neo4j 在 7474/7687;服务不可用时插件退回本地 `knowledge/`。
|
|
139
139
|
- 配置:`knowledge.central = { enabled, url, groupId, timeoutMs, batchSize }`;也支持 `UITEST_KNOWLEDGE_URL` / `UITEST_KNOWLEDGE_GROUP` 覆盖。
|
|
140
140
|
- 中心知识库是主知识源;本地 `knowledge/` 是缓存与离线兜底。批次沉淀后会增量同步页面、流程、case-run、纠错、复盘到中心库。
|
|
141
141
|
- Agent 执行前的 `agent-session knowledge` 先查中心库 `/search`,再合并本地缓存;prompt 先列中心知识,本地页面/流程标注为「本地缓存」,冲突以真实页面为准。
|
|
142
142
|
- 知识页默认打开中心知识库:可浏览近况/事实/实体、按关键词服务端检索、查看 Episode 全文,并直接导入知识文件或文件夹(支持仅预览)。
|
|
143
|
-
- 全量迁移:`
|
|
143
|
+
- 全量迁移:`node scripts/knowledge-central-sync.mjs --project .`;预演加 `--dry-run`。同步状态文件在 `.uitest/studio/knowledge-central-ingested.json`,相同内容自动跳过。
|
|
144
144
|
- 批次 case-run 用稳定键 `case:<caseId>`(batchId 在正文);中心 `/ingest` 按 group+name+内容幂等,同内容跳过,内容变化替换旧版本并清理 `case:<caseId>:*` 旧键;学习事件按 `kind|runDir|stepId` 幂等。
|
|
145
145
|
- 规范 Episode 归最新一次实际执行所有:旧批次重新沉淀不覆盖更新批次;手动/阻断执行没有 run 目录,不发 case Episode。
|
|
146
146
|
- 批次内重跑累计页面、动作与等待,观察变少不缩小正文;页面/流程 Episode 与 `knowledge-central-sync.mjs` 共用同一套序列化,避免互相替换。
|
|
@@ -199,7 +199,7 @@ flow 不是执行前提。自然语言用例才是事实来源。
|
|
|
199
199
|
|
|
200
200
|
## 8. 目录
|
|
201
201
|
|
|
202
|
-
|
|
202
|
+
.
|
|
203
203
|
studio/
|
|
204
204
|
model.mjs 领域模型与纯函数
|
|
205
205
|
store.mjs 批次/用例执行/事件/锁/文档索引
|
|
@@ -229,8 +229,8 @@ flow 不是执行前提。自然语言用例才是事实来源。
|
|
|
229
229
|
|
|
230
230
|
## 10. 测试
|
|
231
231
|
|
|
232
|
-
|
|
233
|
-
node --test
|
|
232
|
+
npm test
|
|
233
|
+
# 等价于 node --test test/ studio/test/
|
|
234
234
|
|
|
235
235
|
工作室单测覆盖:自然语言拆分、导入幂等、计划分泳道、批次存储、flow+Agent 双泳道、按批次回写、回写锁、Host 路由。旧单测覆盖引擎层与旧路由契约。
|
|
236
236
|
|