@kkeve/suite 0.0.9 → 0.0.10
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.
|
@@ -68,10 +68,14 @@ function resolveOptions(opts) {
|
|
|
68
68
|
return { PROJECT_ROOT, TEST_RESULTS_JSON, CONFIDENCE_DATA_JSONL, TEST_CASES_YAML, SCREENSHOTS_DIR, REPORTS_DIR };
|
|
69
69
|
}
|
|
70
70
|
// ─── Helpers ─────────────────────────────────────────────────────
|
|
71
|
+
// 支持两种 caseId 格式:
|
|
72
|
+
// 1. LLM 生成的 AG-01 / WW-01 / REG-01 等:「字母-数字」用 dash 分隔
|
|
73
|
+
// 2. ktest 原始的 TCDPQA100195 / TCDPQA100189 等:「大写字母+数字」连续无分隔
|
|
74
|
+
// (ktest 命名规则:TC=TestCase DPQA=数据平台QA 100195=序列号)
|
|
71
75
|
function parseCaseIdFromTitle(title) {
|
|
72
|
-
const colonMatch = title.match(/^([A-Z]+(?:-[A-Z]+)*-\d+):/);
|
|
73
|
-
const bracketMatch = title.match(/\[([A-Z]+(?:-[A-Z]+)*-\d+)\]/);
|
|
74
|
-
const spaceMatch = title.match(/^([A-Z]+(?:-[A-Z]+)*-\d+)\s/);
|
|
76
|
+
const colonMatch = title.match(/^([A-Z]+(?:-[A-Z]+)*-\d+|[A-Z]+\d+):/);
|
|
77
|
+
const bracketMatch = title.match(/\[([A-Z]+(?:-[A-Z]+)*-\d+|[A-Z]+\d+)\]/);
|
|
78
|
+
const spaceMatch = title.match(/^([A-Z]+(?:-[A-Z]+)*-\d+|[A-Z]+\d+)\s/);
|
|
75
79
|
return colonMatch?.[1] || bracketMatch?.[1] || spaceMatch?.[1] || null;
|
|
76
80
|
}
|
|
77
81
|
/**
|
|
@@ -398,7 +402,8 @@ function buildCaseResultMap(specs, taskDir) {
|
|
|
398
402
|
const suitePathParts = spec.suitePath.split(' > ');
|
|
399
403
|
const pwModuleTitle = suitePathParts.length >= 2 ? suitePathParts[suitePathParts.length - 1].trim() : suitePathParts[0].trim();
|
|
400
404
|
// @keveModel title format: "${id}: ${description}" — extract module ID and description
|
|
401
|
-
|
|
405
|
+
// 模块 ID 可能是字母格式(如 AG-01)或 ktest 纯数字格式(如 7473423)
|
|
406
|
+
const moduleIdMatch = pwModuleTitle.match(/^([A-Z]+(?:-[A-Z]+)*|\d+):\s*(.+)$/);
|
|
402
407
|
const pwModuleId = moduleIdMatch?.[1] || '';
|
|
403
408
|
const pwModuleDescription = moduleIdMatch?.[2] || pwModuleTitle;
|
|
404
409
|
map[caseId] = {
|
|
@@ -551,7 +556,7 @@ async function generateReportData(opts) {
|
|
|
551
556
|
// YAML enrichment (optional): priority, type, precondition, notes, steps
|
|
552
557
|
const yamlCase = yamlCaseLookup[caseId];
|
|
553
558
|
// Title: use result.title (Playwright spec.title) but strip ID prefix for display
|
|
554
|
-
const displayTitle = result.title.replace(/^[A-Z]+-\d+:\s*/, '').replace(/^\[[A-Z]+-\d+\]\s*/, '');
|
|
559
|
+
const displayTitle = result.title.replace(/^[A-Z]+-\d+:\s*|^[A-Z]+\d+:\s*/, '').replace(/^\[[A-Z]+-\d+\]\s*|^\[[A-Z]+\d+\]\s*/, '');
|
|
555
560
|
const steps = aiEntry?.steps
|
|
556
561
|
? aiEntry.steps.map((s) => {
|
|
557
562
|
// 截图路径保持原始相对路径(相对于 taskDir),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kkeve/suite",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"description": "AI-powered full-stack test agent CLI - static analysis, unit test, component test, E2E test, execute, evaluate, and report",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -63,6 +63,7 @@
|
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"@kkeve/core": "^0.0.4",
|
|
66
|
+
"@playwright/test": "*",
|
|
66
67
|
"@vitest/coverage-v8": "^4.1.9",
|
|
67
68
|
"@vue/test-utils": "^2.4.6",
|
|
68
69
|
"chalk": "^4.1.0",
|
|
@@ -73,7 +74,6 @@
|
|
|
73
74
|
"zod": "^4.4.3"
|
|
74
75
|
},
|
|
75
76
|
"devDependencies": {
|
|
76
|
-
"@playwright/test": "^1.60.0",
|
|
77
77
|
"@types/node": "^25.6.0",
|
|
78
78
|
"tsx": "^4.19.0",
|
|
79
79
|
"typescript": "^6.0.2"
|