testflow-ai 0.1.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/LICENSE +21 -0
- package/README.md +502 -0
- package/dist/ai.d.ts +20 -0
- package/dist/ai.d.ts.map +1 -0
- package/dist/ai.js +59 -0
- package/dist/ai.js.map +1 -0
- package/dist/cli.d.ts +11 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +49 -0
- package/dist/cli.js.map +1 -0
- package/dist/executor.d.ts +28 -0
- package/dist/executor.d.ts.map +1 -0
- package/dist/executor.js +390 -0
- package/dist/executor.js.map +1 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +53 -0
- package/dist/index.js.map +1 -0
- package/dist/parser.d.ts +15 -0
- package/dist/parser.d.ts.map +1 -0
- package/dist/parser.js +189 -0
- package/dist/parser.js.map +1 -0
- package/dist/reporter.d.ts +15 -0
- package/dist/reporter.d.ts.map +1 -0
- package/dist/reporter.js +152 -0
- package/dist/reporter.js.map +1 -0
- package/dist/runner.d.ts +30 -0
- package/dist/runner.d.ts.map +1 -0
- package/dist/runner.js +81 -0
- package/dist/runner.js.map +1 -0
- package/dist/types.d.ts +141 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +6 -0
- package/dist/types.js.map +1 -0
- package/package.json +70 -0
package/dist/parser.js
ADDED
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* YAML and Markdown parsers for test flows and project context.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.parseYaml = parseYaml;
|
|
40
|
+
exports.parseYamlFile = parseYamlFile;
|
|
41
|
+
exports.parseContext = parseContext;
|
|
42
|
+
exports.parseContextFile = parseContextFile;
|
|
43
|
+
exports.discoverTestFiles = discoverTestFiles;
|
|
44
|
+
const yaml_1 = require("yaml");
|
|
45
|
+
const fs = __importStar(require("fs/promises"));
|
|
46
|
+
const path = __importStar(require("path"));
|
|
47
|
+
// -- YAML parsing --
|
|
48
|
+
/** Parse a YAML string into a TestFlow. */
|
|
49
|
+
function parseYaml(content) {
|
|
50
|
+
const parsed = (0, yaml_1.parse)(content);
|
|
51
|
+
return normalizeFlow(parsed);
|
|
52
|
+
}
|
|
53
|
+
/** Read and parse a YAML test file. */
|
|
54
|
+
async function parseYamlFile(filePath) {
|
|
55
|
+
const content = await fs.readFile(filePath, 'utf-8');
|
|
56
|
+
return parseYaml(content);
|
|
57
|
+
}
|
|
58
|
+
function normalizeFlow(data) {
|
|
59
|
+
const obj = data;
|
|
60
|
+
if (!obj.name || !obj.steps) {
|
|
61
|
+
throw new Error('Test flow must have "name" and "steps" fields');
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
name: obj.name,
|
|
65
|
+
description: obj.description,
|
|
66
|
+
tags: obj.tags,
|
|
67
|
+
steps: obj.steps.map(normalizeStep),
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
function normalizeStep(data) {
|
|
71
|
+
const obj = data;
|
|
72
|
+
if (!obj.name || !obj.request) {
|
|
73
|
+
throw new Error('Step must have "name" and "request" fields');
|
|
74
|
+
}
|
|
75
|
+
const req = obj.request;
|
|
76
|
+
return {
|
|
77
|
+
name: obj.name,
|
|
78
|
+
description: obj.description,
|
|
79
|
+
request: {
|
|
80
|
+
method: (req.method || 'GET').toUpperCase(),
|
|
81
|
+
url: req.url,
|
|
82
|
+
headers: req.headers,
|
|
83
|
+
body: req.body,
|
|
84
|
+
graphql: req.graphql,
|
|
85
|
+
},
|
|
86
|
+
capture: obj.capture,
|
|
87
|
+
assertions: obj.assertions,
|
|
88
|
+
waitUntil: obj.waitUntil,
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
// -- Context parsing --
|
|
92
|
+
/** Parse a markdown string into ProjectContext. */
|
|
93
|
+
function parseContext(content, fallbackName = 'API') {
|
|
94
|
+
const sections = extractSections(content);
|
|
95
|
+
return {
|
|
96
|
+
name: sections['name'] || fallbackName,
|
|
97
|
+
description: sections['description'] || '',
|
|
98
|
+
baseUrls: parseKeyValues(sections['base urls'] || sections['urls'] || ''),
|
|
99
|
+
endpoints: parseEndpoints(sections['endpoints'] || ''),
|
|
100
|
+
rules: parseList(sections['rules'] || sections['business rules'] || ''),
|
|
101
|
+
ai: parseAiConfig(sections['ai configuration'] || sections['ai'] || ''),
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
/** Read and parse a markdown context file. */
|
|
105
|
+
async function parseContextFile(filePath) {
|
|
106
|
+
const content = await fs.readFile(filePath, 'utf-8');
|
|
107
|
+
return parseContext(content, path.basename(filePath, '.md'));
|
|
108
|
+
}
|
|
109
|
+
function extractSections(content) {
|
|
110
|
+
const sections = {};
|
|
111
|
+
const lines = content.split('\n');
|
|
112
|
+
let currentSection = 'description';
|
|
113
|
+
let buffer = [];
|
|
114
|
+
for (const line of lines) {
|
|
115
|
+
const h1 = line.match(/^#\s+(.+)$/);
|
|
116
|
+
const heading = line.match(/^#{2,}\s+(.+)$/);
|
|
117
|
+
if (h1 && !sections['name']) {
|
|
118
|
+
// Top-level H1 becomes the project name.
|
|
119
|
+
if (buffer.length)
|
|
120
|
+
sections[currentSection.toLowerCase()] = buffer.join('\n').trim();
|
|
121
|
+
sections['name'] = h1[1].trim();
|
|
122
|
+
currentSection = 'description';
|
|
123
|
+
buffer = [];
|
|
124
|
+
}
|
|
125
|
+
else if (heading) {
|
|
126
|
+
if (buffer.length)
|
|
127
|
+
sections[currentSection.toLowerCase()] = buffer.join('\n').trim();
|
|
128
|
+
currentSection = heading[1];
|
|
129
|
+
buffer = [];
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
buffer.push(line);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
if (buffer.length)
|
|
136
|
+
sections[currentSection.toLowerCase()] = buffer.join('\n').trim();
|
|
137
|
+
return sections;
|
|
138
|
+
}
|
|
139
|
+
function parseKeyValues(content) {
|
|
140
|
+
const result = {};
|
|
141
|
+
for (const line of content.split('\n')) {
|
|
142
|
+
const m = line.match(/^-?\s*(\w+):\s*(.+)$/);
|
|
143
|
+
if (m)
|
|
144
|
+
result[m[1]] = m[2].trim();
|
|
145
|
+
}
|
|
146
|
+
return result;
|
|
147
|
+
}
|
|
148
|
+
function parseEndpoints(content) {
|
|
149
|
+
const endpoints = [];
|
|
150
|
+
for (const line of content.split('\n')) {
|
|
151
|
+
const m = line.match(/^-\s+(?:(\w+):\s+)?(GET|POST|PUT|DELETE|PATCH)\s+(\S+)(?:\s+-\s+(.+))?$/i);
|
|
152
|
+
if (m) {
|
|
153
|
+
endpoints.push({
|
|
154
|
+
name: m[1] || `${m[2]} ${m[3]}`,
|
|
155
|
+
method: m[2].toUpperCase(),
|
|
156
|
+
path: m[3],
|
|
157
|
+
description: m[4],
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
return endpoints;
|
|
162
|
+
}
|
|
163
|
+
function parseList(content) {
|
|
164
|
+
const items = [];
|
|
165
|
+
for (const line of content.split('\n')) {
|
|
166
|
+
const m = line.match(/^-\s+(.+)$/);
|
|
167
|
+
if (m)
|
|
168
|
+
items.push(m[1].trim());
|
|
169
|
+
}
|
|
170
|
+
return items;
|
|
171
|
+
}
|
|
172
|
+
function parseAiConfig(content) {
|
|
173
|
+
if (!content)
|
|
174
|
+
return undefined;
|
|
175
|
+
const kv = parseKeyValues(content);
|
|
176
|
+
if (!kv['url'] && !kv['model'])
|
|
177
|
+
return undefined;
|
|
178
|
+
return {
|
|
179
|
+
url: kv['url'] || 'http://localhost:11434',
|
|
180
|
+
model: kv['model'] || 'llama3.2:3b',
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
// -- File discovery --
|
|
184
|
+
/** Recursively find all `.yaml` / `.yml` test files in a directory. */
|
|
185
|
+
async function discoverTestFiles(dir) {
|
|
186
|
+
const { glob } = await import('glob');
|
|
187
|
+
return glob(path.join(dir, '**/*.{yaml,yml}'));
|
|
188
|
+
}
|
|
189
|
+
//# sourceMappingURL=parser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parser.js","sourceRoot":"","sources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AS,CAAC;AACnB,CAAC;AAED,SAAS,SAAS,CAAC,OAAe;IAChC,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,MAAM,IAAI,IAAI,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QACvC,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QACnC,IAAI,CAAC;YAAE,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;IACjC,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,aAAa,CAAC,OAAe;IACpC,IAAI,CAAC,OAAO;QAAE,OAAO,SAAS,CAAC;IAC/B,MAAM,EAAE,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;IACnC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC;QAAE,OAAO,SAAS,CAAC;IACjD,OAAO;QACL,GAAG,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,wBAAwB;QAC1C,KAAK,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,aAAa;KACpC,CAAC;AACJ,CAAC;AAED,uBAAuB;AAEvB,uEAAuE;AAChE,KAAK,UAAU,iBAAiB,CAAC,GAAW;IACjD,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,CAAC;IACtC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,iBAAiB,CAAC,CAAC,CAAC;AACjD,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Report generators — narrative, console, and JSON output.
|
|
3
|
+
*/
|
|
4
|
+
import type { FlowResult, TestReport } from './types.js';
|
|
5
|
+
/** Generate a human-readable narrative from flow results. */
|
|
6
|
+
export declare function generateNarrative(results: FlowResult[]): string;
|
|
7
|
+
/** Aggregate flow results into a TestReport. */
|
|
8
|
+
export declare function generateTechnicalReport(results: FlowResult[]): TestReport;
|
|
9
|
+
/** Print a colored report to stdout. */
|
|
10
|
+
export declare function printConsoleReport(report: TestReport): void;
|
|
11
|
+
/** Serialize a report to a JSON string. */
|
|
12
|
+
export declare function toJSON(report: TestReport): string;
|
|
13
|
+
/** Render a report as a markdown string. */
|
|
14
|
+
export declare function toMarkdown(report: TestReport): string;
|
|
15
|
+
//# sourceMappingURL=reporter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reporter.d.ts","sourceRoot":"","sources":["../src/reporter.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAIzD,6DAA6D;AAC7D,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,MAAM,CA8B/D;AAID,gDAAgD;AAChD,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,UAAU,CAWzE;AAID,wCAAwC;AACxC,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAqC3D;AAID,2CAA2C;AAC3C,wBAAgB,MAAM,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAEjD;AAID,4CAA4C;AAC5C,wBAAgB,UAAU,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,CAwCrD"}
|
package/dist/reporter.js
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Report generators — narrative, console, and JSON output.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.generateNarrative = generateNarrative;
|
|
7
|
+
exports.generateTechnicalReport = generateTechnicalReport;
|
|
8
|
+
exports.printConsoleReport = printConsoleReport;
|
|
9
|
+
exports.toJSON = toJSON;
|
|
10
|
+
exports.toMarkdown = toMarkdown;
|
|
11
|
+
// -- Narrative --
|
|
12
|
+
/** Generate a human-readable narrative from flow results. */
|
|
13
|
+
function generateNarrative(results) {
|
|
14
|
+
const lines = [];
|
|
15
|
+
for (const flow of results) {
|
|
16
|
+
const icon = flow.success ? '✅' : '❌';
|
|
17
|
+
lines.push(`\n${icon} **${flow.flow.name}**`);
|
|
18
|
+
if (flow.flow.description)
|
|
19
|
+
lines.push(` _${flow.flow.description}_`);
|
|
20
|
+
for (const step of flow.steps) {
|
|
21
|
+
lines.push(` ${step.success ? '→' : '✗'} ${step.step.name}`);
|
|
22
|
+
for (const [name, value] of Object.entries(step.captures)) {
|
|
23
|
+
const display = value == null
|
|
24
|
+
? String(value)
|
|
25
|
+
: typeof value === 'string'
|
|
26
|
+
? value.substring(0, 50) + (value.length > 50 ? '…' : '')
|
|
27
|
+
: JSON.stringify(value).substring(0, 50);
|
|
28
|
+
lines.push(` 📦 ${name}: ${display}`);
|
|
29
|
+
}
|
|
30
|
+
for (const a of step.assertions) {
|
|
31
|
+
if (!a.success)
|
|
32
|
+
lines.push(` ⚠️ ${a.message}`);
|
|
33
|
+
}
|
|
34
|
+
if (step.error)
|
|
35
|
+
lines.push(` ❌ ${step.error}`);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return lines.join('\n');
|
|
39
|
+
}
|
|
40
|
+
// -- Technical report --
|
|
41
|
+
/** Aggregate flow results into a TestReport. */
|
|
42
|
+
function generateTechnicalReport(results) {
|
|
43
|
+
const passed = results.filter((r) => r.success).length;
|
|
44
|
+
return {
|
|
45
|
+
timestamp: new Date(),
|
|
46
|
+
duration: results.reduce((sum, r) => sum + r.duration, 0),
|
|
47
|
+
totalFlows: results.length,
|
|
48
|
+
passedFlows: passed,
|
|
49
|
+
failedFlows: results.length - passed,
|
|
50
|
+
flows: results,
|
|
51
|
+
narrative: generateNarrative(results),
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
// -- Console --
|
|
55
|
+
/** Print a colored report to stdout. */
|
|
56
|
+
function printConsoleReport(report) {
|
|
57
|
+
const c = colors;
|
|
58
|
+
console.log('\n' + c.bold('═'.repeat(60)));
|
|
59
|
+
console.log(c.bold(' TESTFLOW AI — RESULTS'));
|
|
60
|
+
console.log(c.bold('═'.repeat(60)));
|
|
61
|
+
console.log(`\n${c.cyan('Summary:')}`);
|
|
62
|
+
console.log(` Total: ${report.totalFlows} flows`);
|
|
63
|
+
console.log(` ${c.green('Passed:')} ${report.passedFlows}`);
|
|
64
|
+
console.log(` ${c.red('Failed:')} ${report.failedFlows}`);
|
|
65
|
+
console.log(` ${c.dim('Duration:')} ${report.duration}ms`);
|
|
66
|
+
console.log(`\n${c.cyan('Narrative:')}`);
|
|
67
|
+
console.log(formatNarrative(report.narrative));
|
|
68
|
+
const failed = report.flows.filter((f) => !f.success);
|
|
69
|
+
if (failed.length > 0) {
|
|
70
|
+
console.log(`\n${c.red('Failures:')}`);
|
|
71
|
+
for (const flow of failed) {
|
|
72
|
+
console.log(`\n ${c.red('✗')} ${c.bold(flow.flow.name)}`);
|
|
73
|
+
for (const step of flow.steps) {
|
|
74
|
+
if (!step.success) {
|
|
75
|
+
console.log(` ${c.yellow('Step:')} ${step.step.name}`);
|
|
76
|
+
if (step.error)
|
|
77
|
+
console.log(` ${c.red('Error:')} ${step.error}`);
|
|
78
|
+
for (const a of step.assertions) {
|
|
79
|
+
if (!a.success) {
|
|
80
|
+
console.log(` ${c.red('Assert:')} ${a.message}`);
|
|
81
|
+
console.log(` ${c.dim('Actual:')} ${JSON.stringify(a.actual)}`);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
console.log('\n' + c.bold('═'.repeat(60)) + '\n');
|
|
89
|
+
}
|
|
90
|
+
// -- JSON --
|
|
91
|
+
/** Serialize a report to a JSON string. */
|
|
92
|
+
function toJSON(report) {
|
|
93
|
+
return JSON.stringify(report, null, 2);
|
|
94
|
+
}
|
|
95
|
+
// -- Markdown --
|
|
96
|
+
/** Render a report as a markdown string. */
|
|
97
|
+
function toMarkdown(report) {
|
|
98
|
+
const lines = [
|
|
99
|
+
'# Test Report',
|
|
100
|
+
'',
|
|
101
|
+
`**Date:** ${report.timestamp.toISOString()}`,
|
|
102
|
+
`**Duration:** ${report.duration}ms`,
|
|
103
|
+
'',
|
|
104
|
+
'## Summary',
|
|
105
|
+
'',
|
|
106
|
+
'| Metric | Value |',
|
|
107
|
+
'|--------|-------|',
|
|
108
|
+
`| Total | ${report.totalFlows} |`,
|
|
109
|
+
`| Passed | ${report.passedFlows} |`,
|
|
110
|
+
`| Failed | ${report.failedFlows} |`,
|
|
111
|
+
'',
|
|
112
|
+
'## Narrative',
|
|
113
|
+
'',
|
|
114
|
+
report.narrative,
|
|
115
|
+
'',
|
|
116
|
+
];
|
|
117
|
+
const failed = report.flows.filter((f) => !f.success);
|
|
118
|
+
if (failed.length > 0) {
|
|
119
|
+
lines.push('## Failures', '');
|
|
120
|
+
for (const flow of failed) {
|
|
121
|
+
lines.push(`### ${flow.flow.name}`, '');
|
|
122
|
+
for (const step of flow.steps) {
|
|
123
|
+
if (!step.success) {
|
|
124
|
+
lines.push(`**Step:** ${step.step.name}`);
|
|
125
|
+
if (step.error)
|
|
126
|
+
lines.push(`- Error: ${step.error}`);
|
|
127
|
+
for (const a of step.assertions) {
|
|
128
|
+
if (!a.success)
|
|
129
|
+
lines.push(`- ${a.message}`);
|
|
130
|
+
}
|
|
131
|
+
lines.push('');
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return lines.join('\n');
|
|
137
|
+
}
|
|
138
|
+
// -- Helpers --
|
|
139
|
+
function formatNarrative(narrative) {
|
|
140
|
+
return narrative
|
|
141
|
+
.replace(/\*\*([^*]+)\*\*/g, '\x1b[1m$1\x1b[0m')
|
|
142
|
+
.replace(/_([^_]+)_/g, '\x1b[2m$1\x1b[0m');
|
|
143
|
+
}
|
|
144
|
+
const colors = {
|
|
145
|
+
bold: (s) => `\x1b[1m${s}\x1b[0m`,
|
|
146
|
+
dim: (s) => `\x1b[2m${s}\x1b[0m`,
|
|
147
|
+
red: (s) => `\x1b[31m${s}\x1b[0m`,
|
|
148
|
+
green: (s) => `\x1b[32m${s}\x1b[0m`,
|
|
149
|
+
yellow: (s) => `\x1b[33m${s}\x1b[0m`,
|
|
150
|
+
cyan: (s) => `\x1b[36m${s}\x1b[0m`,
|
|
151
|
+
};
|
|
152
|
+
//# sourceMappingURL=reporter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reporter.js","sourceRoot":"","sources":["../src/reporter.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAOH,8CA8BC;AAKD,0DAWC;AAKD,gDAqCC;AAKD,wBAEC;AAKD,gCAwCC;AA/ID,kBAAkB;AAElB,6DAA6D;AAC7D,SAAgB,iBAAiB,CAAC,OAAqB;IACrD,MAAM,KAAK,GAAa,EAAE,CAAC;IAE3B,KAAK,MAAM,IAAI,IAAI,OAAO,EAAE,CAAC;QAC3B,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;QACtC,KAAK,CAAC,IAAI,CAAC,KAAK,IAAI,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC;QAC9C,IAAI,IAAI,CAAC,IAAI,CAAC,WAAW;YAAE,KAAK,CAAC,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC;QAEvE,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAC9B,KAAK,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;YA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AAC,WAAW,CAAC,SAAS;IAC3C,MAAM,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,WAAW,CAAC,SAAS;IAC5C,IAAI,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,WAAW,CAAC,SAAS;CAC3C,CAAC"}
|
package/dist/runner.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Test runner — orchestrates discovery, execution, and reporting.
|
|
3
|
+
*/
|
|
4
|
+
import type { TestReport, AiConfig } from './types.js';
|
|
5
|
+
/** Options for `runTests()` and `TestRunner`. */
|
|
6
|
+
export interface RunnerOptions {
|
|
7
|
+
/** Path to a context markdown file. */
|
|
8
|
+
contextFile?: string;
|
|
9
|
+
/** Directory containing YAML test files. */
|
|
10
|
+
testDir?: string;
|
|
11
|
+
/** Explicit list of test file paths. */
|
|
12
|
+
testFiles?: string[];
|
|
13
|
+
/** Only run flows matching these tags. */
|
|
14
|
+
tags?: string[];
|
|
15
|
+
/** Output format (default: `console`). */
|
|
16
|
+
format?: 'console' | 'json' | 'markdown';
|
|
17
|
+
/** Print verbose logs during execution. */
|
|
18
|
+
verbose?: boolean;
|
|
19
|
+
/** Ollama AI configuration (optional). */
|
|
20
|
+
ai?: Partial<AiConfig>;
|
|
21
|
+
}
|
|
22
|
+
export declare class TestRunner {
|
|
23
|
+
private opts;
|
|
24
|
+
constructor(options?: RunnerOptions);
|
|
25
|
+
/** Run all matching tests and produce a report. */
|
|
26
|
+
run(): Promise<TestReport>;
|
|
27
|
+
}
|
|
28
|
+
/** Convenience wrapper: create a runner and execute. */
|
|
29
|
+
export declare function runTests(options: RunnerOptions): Promise<TestReport>;
|
|
30
|
+
//# sourceMappingURL=runner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../src/runner.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,KAAK,EAAwB,UAAU,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE7E,iDAAiD;AACjD,MAAM,WAAW,aAAa;IAC5B,uCAAuC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4CAA4C;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wCAAwC;IACxC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,0CAA0C;IAC1C,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,0CAA0C;IAC1C,MAAM,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,UAAU,CAAC;IACzC,2CAA2C;IAC3C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,0CAA0C;IAC1C,EAAE,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC;CACxB;AAED,qBAAa,UAAU;IACrB,OAAO,CAAC,IAAI,CAAsE;gBAEtE,OAAO,GAAE,aAAkB;IAIvC,mDAAmD;IAC7C,GAAG,IAAI,OAAO,CAAC,UAAU,CAAC;CA4DjC;AAED,wDAAwD;AACxD,wBAAsB,QAAQ,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,UAAU,CAAC,CAE1E"}
|
package/dist/runner.js
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Test runner — orchestrates discovery, execution, and reporting.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.TestRunner = void 0;
|
|
7
|
+
exports.runTests = runTests;
|
|
8
|
+
const parser_js_1 = require("./parser.js");
|
|
9
|
+
const executor_js_1 = require("./executor.js");
|
|
10
|
+
const reporter_js_1 = require("./reporter.js");
|
|
11
|
+
class TestRunner {
|
|
12
|
+
opts;
|
|
13
|
+
constructor(options = {}) {
|
|
14
|
+
this.opts = { format: 'console', verbose: false, ...options };
|
|
15
|
+
}
|
|
16
|
+
/** Run all matching tests and produce a report. */
|
|
17
|
+
async run() {
|
|
18
|
+
// Context
|
|
19
|
+
const context = this.opts.contextFile
|
|
20
|
+
? await (0, parser_js_1.parseContextFile)(this.opts.contextFile)
|
|
21
|
+
: undefined;
|
|
22
|
+
if (context && this.opts.verbose)
|
|
23
|
+
console.log(`📚 Context: ${context.name}`);
|
|
24
|
+
// Discover files
|
|
25
|
+
let files = this.opts.testFiles ? [...this.opts.testFiles] : [];
|
|
26
|
+
if (this.opts.testDir) {
|
|
27
|
+
files = [...files, ...(await (0, parser_js_1.discoverTestFiles)(this.opts.testDir))];
|
|
28
|
+
}
|
|
29
|
+
if (files.length === 0)
|
|
30
|
+
throw new Error('No test files found');
|
|
31
|
+
if (this.opts.verbose)
|
|
32
|
+
console.log(`📁 ${files.length} test file(s)`);
|
|
33
|
+
// Parse & filter
|
|
34
|
+
const flows = [];
|
|
35
|
+
for (const file of files) {
|
|
36
|
+
try {
|
|
37
|
+
const flow = await (0, parser_js_1.parseYamlFile)(file);
|
|
38
|
+
if (this.opts.tags?.length) {
|
|
39
|
+
if (!flow.tags || !this.opts.tags.some((t) => flow.tags?.includes(t)))
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
flows.push(flow);
|
|
43
|
+
}
|
|
44
|
+
catch (err) {
|
|
45
|
+
console.error(`⚠️ Failed to parse ${file}: ${err}`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
if (flows.length === 0)
|
|
49
|
+
throw new Error('No valid test flows found (check tags filter)');
|
|
50
|
+
// Execute
|
|
51
|
+
const executor = new executor_js_1.FlowExecutor(context, this.opts.verbose, this.opts.ai);
|
|
52
|
+
const results = [];
|
|
53
|
+
for (const flow of flows) {
|
|
54
|
+
const result = await executor.executeFlow(flow);
|
|
55
|
+
results.push(result);
|
|
56
|
+
if (this.opts.verbose) {
|
|
57
|
+
console.log(`\n${result.success ? '✅ PASSED' : '❌ FAILED'}: ${flow.name} (${result.duration}ms)`);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
// Report
|
|
61
|
+
const report = (0, reporter_js_1.generateTechnicalReport)(results);
|
|
62
|
+
switch (this.opts.format) {
|
|
63
|
+
case 'console':
|
|
64
|
+
(0, reporter_js_1.printConsoleReport)(report);
|
|
65
|
+
break;
|
|
66
|
+
case 'json':
|
|
67
|
+
console.log(JSON.stringify(report, null, 2));
|
|
68
|
+
break;
|
|
69
|
+
case 'markdown':
|
|
70
|
+
console.log((0, reporter_js_1.toMarkdown)(report));
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
return report;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
exports.TestRunner = TestRunner;
|
|
77
|
+
/** Convenience wrapper: create a runner and execute. */
|
|
78
|
+
async function runTests(options) {
|
|
79
|
+
return new TestRunner(options).run();
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=runner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runner.js","sourceRoot":"","sources":["../src/runner.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAgGH,4BAEC;AAhGD,2CAAiF;AACjF,+CAA6C;AAC7C,+CAAwF;AAqBxF,MAAa,UAAU;IACb,IAAI,CAAsE;IAElF,YAAY,UAAyB,EAAE;QACrC,IAAI,CAAC,IAAI,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC;IAChE,CAAC;IAED,mDAAmD;IACnD,KAAK,CAAC,GAAG;QACP,UAAU;QACV,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW;YACnC,CAAC,CAAC,MAAM,IAAA,4BAAgB,EAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC;YAC/C,CAAC,CAAC,SAAS,CAAC;QAEd,IAAI,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO;YAAE,OAAO,CAAC,GAAG,CAAC,eAAe,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;QAE7E,iBAAiB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B;IACnD,OAAO,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC;AACvC,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core type definitions for testflow-ai.
|
|
3
|
+
*/
|
|
4
|
+
/** Project context loaded from a markdown file. */
|
|
5
|
+
export interface ProjectContext {
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
baseUrls: Record<string, string>;
|
|
9
|
+
endpoints: EndpointDefinition[];
|
|
10
|
+
rules: string[];
|
|
11
|
+
ai?: AiContextConfig;
|
|
12
|
+
}
|
|
13
|
+
/** API endpoint definition extracted from the context file. */
|
|
14
|
+
export interface EndpointDefinition {
|
|
15
|
+
name: string;
|
|
16
|
+
method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
17
|
+
path: string;
|
|
18
|
+
description?: string;
|
|
19
|
+
}
|
|
20
|
+
/** AI configuration from the context file. */
|
|
21
|
+
export interface AiContextConfig {
|
|
22
|
+
url: string;
|
|
23
|
+
model: string;
|
|
24
|
+
}
|
|
25
|
+
/** A complete test flow: a named sequence of steps. */
|
|
26
|
+
export interface TestFlow {
|
|
27
|
+
name: string;
|
|
28
|
+
description?: string;
|
|
29
|
+
tags?: string[];
|
|
30
|
+
steps: TestStep[];
|
|
31
|
+
}
|
|
32
|
+
/** A single test step inside a flow. */
|
|
33
|
+
export interface TestStep {
|
|
34
|
+
name: string;
|
|
35
|
+
description?: string;
|
|
36
|
+
request: RequestDefinition;
|
|
37
|
+
capture?: CaptureDefinition[];
|
|
38
|
+
assertions?: AssertionDefinition[];
|
|
39
|
+
/** Poll until a condition is met (useful for async operations). */
|
|
40
|
+
waitUntil?: WaitUntilConfig;
|
|
41
|
+
}
|
|
42
|
+
/** HTTP request definition. */
|
|
43
|
+
export interface RequestDefinition {
|
|
44
|
+
method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
45
|
+
url: string;
|
|
46
|
+
headers?: Record<string, string>;
|
|
47
|
+
body?: unknown;
|
|
48
|
+
graphql?: GraphQLRequest;
|
|
49
|
+
}
|
|
50
|
+
/** GraphQL-specific request fields. */
|
|
51
|
+
export interface GraphQLRequest {
|
|
52
|
+
query: string;
|
|
53
|
+
variables?: Record<string, unknown>;
|
|
54
|
+
operationName?: string;
|
|
55
|
+
}
|
|
56
|
+
/** Capture a value from the response into a named variable. */
|
|
57
|
+
export interface CaptureDefinition {
|
|
58
|
+
name: string;
|
|
59
|
+
/** Dot-notation path to extract from the response body (e.g. `data.user.id`). */
|
|
60
|
+
path: string;
|
|
61
|
+
}
|
|
62
|
+
/** Assert a condition on the response. */
|
|
63
|
+
export interface AssertionDefinition {
|
|
64
|
+
/** Dot-notation path to the value to check (`status` for HTTP status code). */
|
|
65
|
+
path: string;
|
|
66
|
+
operator: 'equals' | 'notEquals' | 'contains' | 'notContains' | 'exists' | 'notExists' | 'greaterThan' | 'lessThan' | 'matches' | 'ai-evaluate';
|
|
67
|
+
/** Expected value, or evaluation prompt for `ai-evaluate`. */
|
|
68
|
+
value?: unknown;
|
|
69
|
+
/** Custom message shown on failure. */
|
|
70
|
+
message?: string;
|
|
71
|
+
}
|
|
72
|
+
/** Polling configuration for async operations. */
|
|
73
|
+
export interface WaitUntilConfig {
|
|
74
|
+
path: string;
|
|
75
|
+
operator: 'equals' | 'notEquals' | 'exists' | 'notExists';
|
|
76
|
+
value?: unknown;
|
|
77
|
+
/** Max wait time in ms (default: 30 000). */
|
|
78
|
+
timeout?: number;
|
|
79
|
+
/** Poll interval in ms (default: 2 000). */
|
|
80
|
+
interval?: number;
|
|
81
|
+
}
|
|
82
|
+
/** Result of executing a complete flow. */
|
|
83
|
+
export interface FlowResult {
|
|
84
|
+
flow: TestFlow;
|
|
85
|
+
success: boolean;
|
|
86
|
+
duration: number;
|
|
87
|
+
steps: StepResult[];
|
|
88
|
+
variables: Record<string, unknown>;
|
|
89
|
+
}
|
|
90
|
+
/** Result of executing a single step. */
|
|
91
|
+
export interface StepResult {
|
|
92
|
+
step: TestStep;
|
|
93
|
+
success: boolean;
|
|
94
|
+
duration: number;
|
|
95
|
+
request: {
|
|
96
|
+
method: string;
|
|
97
|
+
url: string;
|
|
98
|
+
body?: unknown;
|
|
99
|
+
};
|
|
100
|
+
response?: {
|
|
101
|
+
status: number;
|
|
102
|
+
headers: Record<string, string>;
|
|
103
|
+
body: unknown;
|
|
104
|
+
};
|
|
105
|
+
captures: Record<string, unknown>;
|
|
106
|
+
assertions: AssertionResult[];
|
|
107
|
+
error?: string;
|
|
108
|
+
}
|
|
109
|
+
/** Result of a single assertion evaluation. */
|
|
110
|
+
export interface AssertionResult {
|
|
111
|
+
assertion: AssertionDefinition;
|
|
112
|
+
success: boolean;
|
|
113
|
+
actual?: unknown;
|
|
114
|
+
message: string;
|
|
115
|
+
}
|
|
116
|
+
/** Aggregated test report. */
|
|
117
|
+
export interface TestReport {
|
|
118
|
+
timestamp: Date;
|
|
119
|
+
duration: number;
|
|
120
|
+
totalFlows: number;
|
|
121
|
+
passedFlows: number;
|
|
122
|
+
failedFlows: number;
|
|
123
|
+
flows: FlowResult[];
|
|
124
|
+
narrative: string;
|
|
125
|
+
}
|
|
126
|
+
/** AI evaluator configuration. */
|
|
127
|
+
export interface AiConfig {
|
|
128
|
+
/** Ollama API URL (default: `http://localhost:11434`). */
|
|
129
|
+
url: string;
|
|
130
|
+
/** Model name (default: `llama3.2:3b`). */
|
|
131
|
+
model: string;
|
|
132
|
+
/** Request timeout in ms (default: 30 000). */
|
|
133
|
+
timeout: number;
|
|
134
|
+
}
|
|
135
|
+
/** Result returned by the AI evaluator. */
|
|
136
|
+
export interface AiEvaluation {
|
|
137
|
+
pass: boolean;
|
|
138
|
+
confidence: number;
|
|
139
|
+
reason: string;
|
|
140
|
+
}
|
|
141
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types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