chore(test): 新增统一测试入口与端到端场景模拟脚本

- scripts/run-memind-tests.mjs:按改动文件自动匹配 test + verify 范围
  (quick/changed/guards/release/full 模式),配套 memind-test skill
- scripts/run-scenario-test.mjs + scenario-test-lib.mjs:真实登录 + 多轮
  聊天 + 页面生成 + 公网可访问性的端到端模拟,配套 memind-scenario-test
  skill 与首个场景 scenarios/suzhou-page.json
- package.json 新增 test:memind / test:scenario 脚本别名

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-07-07 10:55:31 +08:00
parent ec8d0464a3
commit b4171ca268
10 changed files with 1340 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
{
"id": "your-scenario-id",
"name": "场景名称",
"description": "一句话说明这个场景测什么",
"account": {
"username": "john",
"password": "888888"
},
"steps": [
{
"action": "login",
"label": "登录"
},
{
"action": "chat",
"label": "第一步对话",
"message": "hi",
"expect": {
"assistantMinChars": 1,
"timeoutMs": 120000
}
},
{
"action": "chat",
"label": "第二步对话(可带页面断言)",
"message": "你的测试消息",
"expect": {
"assistantMinChars": 20,
"timeoutMs": 300000,
"replyKeywords": ["关键词"],
"page": {
"keywords": ["页面里应出现的词"],
"requirePublicLink": true,
"requireHttp200": true,
"requireMindspaceCover": false
}
}
}
]
}
+39
View File
@@ -0,0 +1,39 @@
{
"id": "suzhou-page",
"name": "苏州攻略一日游页面",
"description": "登录 john → 打招呼 → 请求生成苏州 1 日攻略页面 → 验证回复与公网可访问",
"account": {
"username": "john",
"password": "888888"
},
"steps": [
{
"action": "login",
"label": "登录 john 账户"
},
{
"action": "chat",
"label": "发送 hi 并等待回复",
"message": "hi",
"expect": {
"assistantMinChars": 1,
"timeoutMs": 120000
}
},
{
"action": "chat",
"label": "请求苏州攻略页面并验证",
"message": "帮我看看苏州攻略,1日攻略,做一个页面",
"expect": {
"assistantMinChars": 20,
"timeoutMs": 300000,
"replyKeywords": ["苏州"],
"page": {
"keywords": ["苏州"],
"requirePublicLink": true,
"requireHttp200": true
}
}
}
]
}