speccore 8.3.285 → 8.3.295
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/.agents/skills/spec-run/SKILL.md +16 -0
- package/.agents/skills/spec-task-create/SKILL.md +15 -0
- package/.agents/skills/spec-unitize/SKILL.md +16 -0
- package/README.en.md +16 -3
- package/README.md +23 -8
- package/dist/cli.js +59 -12
- package/dist/cli.js.map +1 -1
- package/dist/commands/about.d.ts.map +1 -1
- package/dist/commands/about.js +5 -0
- package/dist/commands/about.js.map +1 -1
- package/dist/commands/analyze.d.ts.map +1 -1
- package/dist/commands/analyze.js +77 -5
- package/dist/commands/analyze.js.map +1 -1
- package/dist/commands/ask.js +2 -2
- package/dist/commands/ask.js.map +1 -1
- package/dist/commands/code-index.d.ts.map +1 -1
- package/dist/commands/code-index.js +20 -9
- package/dist/commands/code-index.js.map +1 -1
- package/dist/commands/doc2spec.js +32 -60
- package/dist/commands/doc2spec.js.map +1 -1
- package/dist/commands/execute.d.ts +1 -0
- package/dist/commands/execute.d.ts.map +1 -1
- package/dist/commands/execute.js +15 -1
- package/dist/commands/execute.js.map +1 -1
- package/dist/commands/help.js +14 -5
- package/dist/commands/help.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +14 -3
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/iteration/taskify.d.ts.map +1 -1
- package/dist/commands/iteration/taskify.js +132 -7
- package/dist/commands/iteration/taskify.js.map +1 -1
- package/dist/commands/run.d.ts +1 -0
- package/dist/commands/run.d.ts.map +1 -1
- package/dist/commands/run.js +193 -25
- package/dist/commands/run.js.map +1 -1
- package/dist/commands/status-panel.d.ts +1 -0
- package/dist/commands/status-panel.d.ts.map +1 -1
- package/dist/commands/status-panel.js +180 -54
- package/dist/commands/status-panel.js.map +1 -1
- package/dist/commands/task/new.d.ts +16 -0
- package/dist/commands/task/new.d.ts.map +1 -1
- package/dist/commands/task/new.js +232 -14
- package/dist/commands/task/new.js.map +1 -1
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +78 -1
- package/dist/commands/verify.js.map +1 -1
- package/dist/core/analyze-engine.d.ts.map +1 -1
- package/dist/core/analyze-engine.js +6 -10
- package/dist/core/analyze-engine.js.map +1 -1
- package/dist/core/ask-llm.d.ts +7 -0
- package/dist/core/ask-llm.d.ts.map +1 -1
- package/dist/core/ask-llm.js +45 -0
- package/dist/core/ask-llm.js.map +1 -1
- package/dist/core/code-graph/incremental-build.d.ts +2 -0
- package/dist/core/code-graph/incremental-build.d.ts.map +1 -1
- package/dist/core/code-graph/incremental-build.js +6 -5
- package/dist/core/code-graph/incremental-build.js.map +1 -1
- package/dist/core/code-graph/index.d.ts +2 -0
- package/dist/core/code-graph/index.d.ts.map +1 -1
- package/dist/core/code-graph/index.js +12 -5
- package/dist/core/code-graph/index.js.map +1 -1
- package/dist/core/code-scanner.d.ts +19 -4
- package/dist/core/code-scanner.d.ts.map +1 -1
- package/dist/core/code-scanner.js +193 -77
- package/dist/core/code-scanner.js.map +1 -1
- package/dist/core/excel-extract.d.ts +16 -2
- package/dist/core/excel-extract.d.ts.map +1 -1
- package/dist/core/excel-extract.js +54 -12
- package/dist/core/excel-extract.js.map +1 -1
- package/dist/core/git-integration.d.ts +2 -1
- package/dist/core/git-integration.d.ts.map +1 -1
- package/dist/core/git-integration.js +38 -14
- package/dist/core/git-integration.js.map +1 -1
- package/dist/core/global-counters.d.ts +3 -0
- package/dist/core/global-counters.d.ts.map +1 -1
- package/dist/core/global-counters.js +21 -7
- package/dist/core/global-counters.js.map +1 -1
- package/dist/core/intent-recognition.d.ts.map +1 -1
- package/dist/core/intent-recognition.js +173 -27
- package/dist/core/intent-recognition.js.map +1 -1
- package/dist/core/plan-store.d.ts +1 -0
- package/dist/core/plan-store.d.ts.map +1 -1
- package/dist/core/plan-store.js.map +1 -1
- package/dist/core/prompt-builder.d.ts.map +1 -1
- package/dist/core/prompt-builder.js +168 -140
- package/dist/core/prompt-builder.js.map +1 -1
- package/dist/core/spec-paths.d.ts.map +1 -1
- package/dist/core/spec-paths.js +3 -0
- package/dist/core/spec-paths.js.map +1 -1
- package/dist/core/spec-skeleton.d.ts.map +1 -1
- package/dist/core/spec-skeleton.js +6 -2
- package/dist/core/spec-skeleton.js.map +1 -1
- package/dist/core/stage-aliases.d.ts +40 -0
- package/dist/core/stage-aliases.d.ts.map +1 -0
- package/dist/core/stage-aliases.js +110 -0
- package/dist/core/stage-aliases.js.map +1 -0
- package/dist/core/state.d.ts +11 -0
- package/dist/core/state.d.ts.map +1 -1
- package/dist/core/state.js +33 -2
- package/dist/core/state.js.map +1 -1
- package/dist/core/structured-extractor.d.ts.map +1 -1
- package/dist/core/structured-extractor.js +7 -0
- package/dist/core/structured-extractor.js.map +1 -1
- package/dist/core/ui-verify/index.d.ts +2 -2
- package/dist/core/ui-verify/index.d.ts.map +1 -1
- package/dist/core/ui-verify/index.js +3 -1
- package/dist/core/ui-verify/index.js.map +1 -1
- package/dist/core/ui-verify/smoke-engine.d.ts.map +1 -1
- package/dist/core/ui-verify/smoke-engine.js +36 -0
- package/dist/core/ui-verify/smoke-engine.js.map +1 -1
- package/dist/core/ui-verify/spec-generator.d.ts +32 -1
- package/dist/core/ui-verify/spec-generator.d.ts.map +1 -1
- package/dist/core/ui-verify/spec-generator.js +205 -21
- package/dist/core/ui-verify/spec-generator.js.map +1 -1
- package/dist/core/ui-verify/types.d.ts +2 -0
- package/dist/core/ui-verify/types.d.ts.map +1 -1
- package/dist/utils/synonyms.d.ts.map +1 -1
- package/dist/utils/synonyms.js +15 -0
- package/dist/utils/synonyms.js.map +1 -1
- package/package.json +3 -2
- package/templates/api-design-example.md +338 -0
- package/templates/ci/github-actions.yml +44 -0
- package/templates/database-example.md +223 -0
- package/templates/deploy-docker/README.md +284 -0
- package/templates/deploy-docker/deploy-remote.sh +79 -0
- package/templates/deploy-docker/docker-compose.yml +113 -0
- package/templates/deploy-docker/frontend.Dockerfile +43 -0
- package/templates/deploy-docker/nginx.conf +30 -0
- package/templates/deploy-examples.yaml +436 -0
- package/templates/deploy-java/Dockerfile +50 -0
- package/templates/deploy-java/README.md +212 -0
- package/templates/deploy-java/deploy.sh +120 -0
- package/templates/deploy-java/spring-boot.service +35 -0
- package/templates/html/speccore-ask-explain.html +10 -0
- package/templates/html/speccore-ask-guide.html +10 -0
- package/templates/html/speccore-ask-match.html +10 -0
- package/templates/html/speccore-ask-pipeline.html +1 -0
- package/templates/html/speccore-ask-result.html +10 -0
- package/templates/html/speccore-help.html +241 -0
- package/templates/html/speccore-setup-guide.html +289 -0
- package/templates/security-example.md +226 -0
- package/templates/verify-spec-example.yaml +138 -0
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# VERIFY_SPEC.yaml — UI 冒烟测试规格
|
|
2
|
+
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
3
|
+
# 格式类型: VERIFY_SPEC 格式(scenarios + actions + assertions 结构)
|
|
4
|
+
# 适用场景: 精细 UI 交互测试(填写表单、点击按钮、断言元素状态)
|
|
5
|
+
# 对应命令:
|
|
6
|
+
# • speccore verify --ui --spec ./tests/smoke.yaml ← 推荐,原生支持完整交互逻辑
|
|
7
|
+
# • speccore verify --ui --config ./tests/smoke.yaml ← 兼容,自动转换为批量页面测试
|
|
8
|
+
# 按模块过滤: speccore verify --ui --spec ./tests/smoke.yaml --module=login
|
|
9
|
+
#
|
|
10
|
+
# ⚠️ 格式说明:
|
|
11
|
+
# VERIFY_SPEC 格式 = scenarios + actions + assertions(本文件,支持完整交互)
|
|
12
|
+
# TestConfig 格式 = tests + routes + type(用于批量页面/API测试,见 pr.yaml/release.yaml)
|
|
13
|
+
# 两种格式 speccore verify --config 均可自动识别。
|
|
14
|
+
#
|
|
15
|
+
# v8.3.95+ 支持: cookie / localStorage / script / scroll / upload / iframe / waitForRequest / waitForResponse
|
|
16
|
+
|
|
17
|
+
name: 示例项目冒烟测试
|
|
18
|
+
platform: h5-mobile
|
|
19
|
+
url: /
|
|
20
|
+
|
|
21
|
+
scenarios:
|
|
22
|
+
# ── 场景1: 登录流程 ──
|
|
23
|
+
- name: 登录-账号密码登录
|
|
24
|
+
description: 模块:auth 页面:/login
|
|
25
|
+
actions:
|
|
26
|
+
- type: navigate
|
|
27
|
+
value: /login
|
|
28
|
+
- type: fill
|
|
29
|
+
selector: 'input[name="username"]'
|
|
30
|
+
value: test_user
|
|
31
|
+
- type: fill
|
|
32
|
+
selector: 'input[name="password"]'
|
|
33
|
+
value: test_password
|
|
34
|
+
- type: click
|
|
35
|
+
selector: 'button[type="submit"]'
|
|
36
|
+
waitFor: '.dashboard-container'
|
|
37
|
+
assertions:
|
|
38
|
+
- type: url
|
|
39
|
+
contains: /dashboard
|
|
40
|
+
- type: visible
|
|
41
|
+
selector: '.dashboard-container'
|
|
42
|
+
|
|
43
|
+
# ── 场景2: Cookie 注入免登录 ──
|
|
44
|
+
# 适用于: 已有登录态 Cookie,跳过登录页直接测试业务模块
|
|
45
|
+
- name: 预订列表-免登录(cookie注入)
|
|
46
|
+
description: 模块:booking 页面:/booking/list
|
|
47
|
+
actions:
|
|
48
|
+
# 注入登录 Cookie(跳过登录页)
|
|
49
|
+
- type: cookie
|
|
50
|
+
selector: session_token
|
|
51
|
+
value: eyJhbGciOiJIUzI1NiIs...
|
|
52
|
+
domain: example.com
|
|
53
|
+
path: /
|
|
54
|
+
secure: true
|
|
55
|
+
httpOnly: true
|
|
56
|
+
- type: navigate
|
|
57
|
+
value: /booking/list
|
|
58
|
+
- type: wait
|
|
59
|
+
delay: 1000
|
|
60
|
+
assertions:
|
|
61
|
+
- type: visible
|
|
62
|
+
selector: '.booking-list'
|
|
63
|
+
- type: count
|
|
64
|
+
selector: '.booking-item'
|
|
65
|
+
count: 5
|
|
66
|
+
|
|
67
|
+
# ── 场景3: localStorage 注入 Token ──
|
|
68
|
+
# 适用于: JWT Token 存储在 localStorage 的前端项目
|
|
69
|
+
- name: 个人中心-Token注入
|
|
70
|
+
description: 模块:user 页面:/profile
|
|
71
|
+
actions:
|
|
72
|
+
- type: localStorage
|
|
73
|
+
selector: accessToken
|
|
74
|
+
value: Bearer eyJhbGciOiJIUzI1NiIs...
|
|
75
|
+
- type: navigate
|
|
76
|
+
value: /profile
|
|
77
|
+
- type: wait
|
|
78
|
+
delay: 500
|
|
79
|
+
assertions:
|
|
80
|
+
- type: visible
|
|
81
|
+
selector: '.profile-header'
|
|
82
|
+
- type: text
|
|
83
|
+
selector: '.username'
|
|
84
|
+
contains: test_user
|
|
85
|
+
|
|
86
|
+
# ── 场景4: 按模块测试示例 (booking 模块) ──
|
|
87
|
+
# 运行: speccore verify --ui --config ./tests/smoke.yaml --module=booking
|
|
88
|
+
- name: 预订表单-提交预订
|
|
89
|
+
description: 模块:booking 页面:/booking/create
|
|
90
|
+
actions:
|
|
91
|
+
- type: navigate
|
|
92
|
+
value: /booking/create
|
|
93
|
+
- type: fill
|
|
94
|
+
selector: 'input[name="checkIn"]'
|
|
95
|
+
value: '2026-10-01'
|
|
96
|
+
- type: fill
|
|
97
|
+
selector: 'input[name="checkOut"]'
|
|
98
|
+
value: '2026-10-05'
|
|
99
|
+
- type: click
|
|
100
|
+
selector: '.search-btn'
|
|
101
|
+
waitFor: '.room-list'
|
|
102
|
+
- type: click
|
|
103
|
+
selector: '.room-item:first-child .select-btn'
|
|
104
|
+
- type: click
|
|
105
|
+
selector: '.submit-booking-btn'
|
|
106
|
+
waitFor: '.booking-success'
|
|
107
|
+
assertions:
|
|
108
|
+
- type: visible
|
|
109
|
+
selector: '.booking-success'
|
|
110
|
+
- type: text
|
|
111
|
+
selector: '.booking-success'
|
|
112
|
+
contains: 预订成功
|
|
113
|
+
|
|
114
|
+
# ── 场景5: 滚动 + 元素存在性检查 ──
|
|
115
|
+
- name: 首页-滚动加载
|
|
116
|
+
description: 模块:home 页面:/
|
|
117
|
+
actions:
|
|
118
|
+
- type: navigate
|
|
119
|
+
value: /
|
|
120
|
+
- type: scroll
|
|
121
|
+
selector: bottom
|
|
122
|
+
- type: wait
|
|
123
|
+
delay: 1000
|
|
124
|
+
assertions:
|
|
125
|
+
- type: visible
|
|
126
|
+
selector: '.footer'
|
|
127
|
+
|
|
128
|
+
# ── 场景6: 样式断言 ──
|
|
129
|
+
- name: 按钮-样式检查
|
|
130
|
+
description: 模块:ui 页面:/
|
|
131
|
+
actions:
|
|
132
|
+
- type: navigate
|
|
133
|
+
value: /
|
|
134
|
+
assertions:
|
|
135
|
+
- type: style
|
|
136
|
+
selector: '.primary-btn'
|
|
137
|
+
style: background-color
|
|
138
|
+
value: rgb(24, 144, 255)
|