csspilot 0.1.0 → 0.2.0
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 +122 -0
- package/dist/bin.js +1683 -849
- package/dist/index.js +1683 -849
- package/dist/skills/testpilot/SKILL.md +20 -10
- package/dist/skills/testpilot/manifest.yaml +3 -3
- package/dist/skills/testpilot/workflows/analyze-result.md +1 -1
- package/dist/skills/testpilot/workflows/create-case.md +1 -1
- package/dist/skills/testpilot/workflows/run.md +3 -3
- package/dist/skills/testpilot/workflows/validate.md +2 -2
- package/package.json +2 -8
|
@@ -23,9 +23,9 @@ Use TestPilot when the user wants to:
|
|
|
23
23
|
2. Inspect project
|
|
24
24
|
3. Identify test target
|
|
25
25
|
4. Create TestPilot Case (`tests/e2e/cases/*.yaml`)
|
|
26
|
-
5. Validate Case (`npx
|
|
27
|
-
6. Run Case (`npx
|
|
28
|
-
7. Analyze result (`npx
|
|
26
|
+
5. Validate Case (`npx csspilot validate`)
|
|
27
|
+
6. Run Case (`npx csspilot run`)
|
|
28
|
+
7. Analyze result (`npx csspilot report`)
|
|
29
29
|
|
|
30
30
|
## Important rules
|
|
31
31
|
|
|
@@ -40,17 +40,27 @@ Use TestPilot when the user wants to:
|
|
|
40
40
|
## CLI
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
|
-
npx
|
|
44
|
-
npx
|
|
45
|
-
npx
|
|
46
|
-
npx
|
|
47
|
-
npx
|
|
48
|
-
npx
|
|
43
|
+
npx csspilot init # install TestPilot into the current project
|
|
44
|
+
npx csspilot validate # validate cases against the DSL
|
|
45
|
+
npx csspilot list # list cases (--tag smoke)
|
|
46
|
+
npx csspilot run # run cases (file paths / --tag)
|
|
47
|
+
npx csspilot report # generate JSON + HTML report
|
|
48
|
+
npx csspilot doctor # health check (config / cases / adapters / env / server)
|
|
49
|
+
npx csspilot ci init # generate TestPilot CI workflow template
|
|
49
50
|
```
|
|
50
51
|
|
|
52
|
+
## Project context
|
|
53
|
+
|
|
54
|
+
Read `references/` first (generated by `csspilot init` for this project):
|
|
55
|
+
|
|
56
|
+
- `references/project.md` — project name / type / test dirs / available adapters
|
|
57
|
+
- `references/test-conventions.md` — the testing rules this project enforces
|
|
58
|
+
- `references/adapters.md` — detected adapter status
|
|
59
|
+
|
|
60
|
+
|
|
51
61
|
## Directory map (business project)
|
|
52
62
|
|
|
53
|
-
- `.
|
|
63
|
+
- `.agents/skills/testpilot/` — this skill (AI usage spec)
|
|
54
64
|
- `.testpilot/` — TestPilot runtime state and artifacts
|
|
55
65
|
- `tests/e2e/cases/` — business cases
|
|
56
66
|
- `testpilot.yaml` — project-level TestPilot config
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# TestPilot Skill 清单(源文件)
|
|
2
|
-
# `npx
|
|
2
|
+
# `npx csspilot init` 会把整个 skills/testpilot/ 安装到业务项目 .agents/skills/testpilot/
|
|
3
3
|
id: testpilot
|
|
4
4
|
name: TestPilot
|
|
5
|
-
version: 0.1.
|
|
5
|
+
version: 0.1.1
|
|
6
6
|
|
|
7
7
|
description: >
|
|
8
8
|
AI Native cross-platform testing skill.
|
|
@@ -15,7 +15,7 @@ capabilities:
|
|
|
15
15
|
- report
|
|
16
16
|
|
|
17
17
|
runtime:
|
|
18
|
-
cli:
|
|
18
|
+
cli: csspilot
|
|
19
19
|
|
|
20
20
|
permissions:
|
|
21
21
|
filesystem:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Workflow:分析测试结果
|
|
2
2
|
|
|
3
|
-
1. 执行 `npx
|
|
3
|
+
1. 执行 `npx csspilot report` 生成报告。
|
|
4
4
|
2. 产物位于 `.testpilot/artifacts/runs/<run-id>/`:
|
|
5
5
|
- `report.json` —— 结构化结果,AI 优先读这个:`{ generatedAt, summary: { runId, status, totals, cases: [{ caseId, status, steps: [{ index, target, action, status, durationMs, error?, screenshot?, extracted? }] }] } }`
|
|
6
6
|
- `report.html` —— 人类可读报告
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
3. 找到业务路径上的真实页面与组件,收集证据(读代码 / DOM / 现有测试)。
|
|
8
8
|
4. 确定测试路径:从入口到业务结果页的完整步骤。
|
|
9
9
|
5. 按 DSL 规范生成 Case,写入 `tests/e2e/cases/<case-id>.yaml`。
|
|
10
|
-
6. 执行 `npx
|
|
10
|
+
6. 执行 `npx csspilot validate tests/e2e/cases/<case-id>.yaml`。
|
|
11
11
|
7. 校验失败则修复 Case 后重新 validate,直到通过。
|
|
12
12
|
|
|
13
13
|
禁止:跳过第 2-3 步直接生成 Case(AI 不能凭空生成测试)。
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# Workflow:执行测试
|
|
2
2
|
|
|
3
3
|
```bash
|
|
4
|
-
npx
|
|
5
|
-
npx
|
|
6
|
-
npx
|
|
4
|
+
npx csspilot run # 运行项目配置(testpilot.yaml)中的 Case
|
|
5
|
+
npx csspilot run <file> # 运行指定 Case
|
|
6
|
+
npx csspilot run --tag smoke # 按标签运行
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
执行链路:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "csspilot",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "TestPilot — AI Native 跨端业务测试基础设施 CLI",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -28,14 +28,8 @@
|
|
|
28
28
|
"playwright": "^1.53.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@testpilot/adapter-core": "workspace:^",
|
|
32
|
-
"@testpilot/adapter-playwright": "workspace:^",
|
|
33
|
-
"@testpilot/adapter-wechatide": "workspace:^",
|
|
34
31
|
"@testpilot/core": "workspace:^",
|
|
35
|
-
"@testpilot/
|
|
36
|
-
"@testpilot/evidence": "workspace:^",
|
|
37
|
-
"@testpilot/execution-engine": "workspace:^",
|
|
38
|
-
"@testpilot/reporter": "workspace:^",
|
|
32
|
+
"@testpilot/sdk": "workspace:^",
|
|
39
33
|
"@types/node": "^22.0.0",
|
|
40
34
|
"commander": "^12.0.0",
|
|
41
35
|
"esbuild": "^0.25.0",
|