@feasibleone/blong-chain 1.3.0 → 1.4.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/CHANGELOG.md +14 -0
- package/dist/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/index.ts +900 -0
- package/package.json +1 -1
- package/test-types.ts +343 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.4.0](https://github.com/feasibleone/blong/compare/blong-chain-v1.3.1...blong-chain-v1.4.0) (2026-03-29)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* implement OpenAPI integration, test collections, and enhanced reporting ([#101](https://github.com/feasibleone/blong/issues/101)) ([34f4e42](https://github.com/feasibleone/blong/commit/34f4e421b404079e309a6a4e3cda123c423ade85))
|
|
9
|
+
|
|
10
|
+
## [1.3.1](https://github.com/feasibleone/blong/compare/blong-chain-v1.3.0...blong-chain-v1.3.1) (2026-03-16)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* add ut-function.cbc dependency and update usage in config loading ([44914cc](https://github.com/feasibleone/blong/commit/44914cc7b95a795460fa7c543718241a59899189))
|
|
16
|
+
|
|
3
17
|
## [1.3.0](https://github.com/feasibleone/blong/compare/blong-chain-v1.2.3...blong-chain-v1.3.0) (2026-03-16)
|
|
4
18
|
|
|
5
19
|
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAC,YAAY,EAAC,MAAM,aAAa,CAAC;AACzC,OAAO,MAAM,MAAM,SAAS,CAAC;AAoB7B;;;;;;;GAOG;AACH,SAAS,m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ED,IAAI,CAA8B,KAAQ,EAAE,GAAG,IAAgC;QAC3E,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,CAAC;IACtC,CAAC;CACJ"}
|
package/dist/package.json
CHANGED
package/index.ts
ADDED
|
@@ -0,0 +1,900 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parallel Test Executor
|
|
3
|
+
*
|
|
4
|
+
* Implements the new parallel test execution framework with:
|
|
5
|
+
* - Thenable proxies for automatic dependency detection
|
|
6
|
+
* - Parallel execution with configurable concurrency
|
|
7
|
+
* - Dependency graph tracking
|
|
8
|
+
* - Live progress tracking
|
|
9
|
+
* - Enhanced error reporting
|
|
10
|
+
* - Latency metrics
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import assert from 'node:assert';
|
|
14
|
+
import {EventEmitter} from 'node:events';
|
|
15
|
+
import PQueue from 'p-queue';
|
|
16
|
+
import type {
|
|
17
|
+
IDependencyEdge,
|
|
18
|
+
IDependencyGraph,
|
|
19
|
+
IMeta,
|
|
20
|
+
IPromiseEntry,
|
|
21
|
+
ISourceLocation,
|
|
22
|
+
IStepError,
|
|
23
|
+
IStepLatency,
|
|
24
|
+
IStepProgress,
|
|
25
|
+
ITestContext,
|
|
26
|
+
ITestEvents,
|
|
27
|
+
ITestExecutorConfig,
|
|
28
|
+
ITestLatency,
|
|
29
|
+
ITestProgress,
|
|
30
|
+
IThenableProxy,
|
|
31
|
+
StepArray,
|
|
32
|
+
StepFunction,
|
|
33
|
+
} from './test-types.js';
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Creates a thenable proxy for a given context path.
|
|
37
|
+
* The proxy acts as a Promise and supports nested property access.
|
|
38
|
+
*
|
|
39
|
+
* @param path - The context path (e.g., 'setupData' or 'setupData.user.name')
|
|
40
|
+
* @param promiseManager - The promise manager to get/create promises
|
|
41
|
+
* @returns A thenable proxy that can be awaited or have properties accessed
|
|
42
|
+
*/
|
|
43
|
+
function createThenableProxy<T = unknown>(
|
|
44
|
+
path: string,
|
|
45
|
+
promiseManager: PromiseManager,
|
|
46
|
+
): IThenableProxy<T> {
|
|
47
|
+
// Get or create the promise for this path
|
|
48
|
+
const promiseEntry = promiseManager.getOrCreate(path);
|
|
49
|
+
|
|
50
|
+
// Create a proxy that intercepts property access
|
|
51
|
+
const proxy = new Proxy(promiseEntry.promise as any, {
|
|
52
|
+
get(target: Promise<T>, prop: string | symbol): any {
|
|
53
|
+
// Promise methods: delegate to the real promise
|
|
54
|
+
if (prop === 'then' || prop === 'catch' || prop === 'finally') {
|
|
55
|
+
return (target as any)[prop].bind(target);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Symbol properties (like Symbol.toStringTag)
|
|
59
|
+
if (typeof prop === 'symbol') {
|
|
60
|
+
return (target as any)[prop];
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Property access: return nested thenable proxy
|
|
64
|
+
return createThenableProxy(`${path}.${prop}`, promiseManager);
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
return proxy as IThenableProxy<T>;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Manages promises for all context paths.
|
|
73
|
+
* Provides lazy creation and caching of promises.
|
|
74
|
+
*/
|
|
75
|
+
class PromiseManager {
|
|
76
|
+
private promises = new Map<string, IPromiseEntry>();
|
|
77
|
+
private realContext: Record<string, unknown>;
|
|
78
|
+
|
|
79
|
+
constructor(realContext: Record<string, unknown>) {
|
|
80
|
+
this.realContext = realContext;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Gets an existing promise or creates a new one for the given path
|
|
85
|
+
*/
|
|
86
|
+
getOrCreate<T = unknown>(path: string): IPromiseEntry<T> {
|
|
87
|
+
if (this.promises.has(path)) {
|
|
88
|
+
return this.promises.get(path) as IPromiseEntry<T>;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
let resolve: (value: T) => void;
|
|
92
|
+
let reject: (error: Error) => void;
|
|
93
|
+
|
|
94
|
+
const promise = new Promise<T>((res, rej) => {
|
|
95
|
+
resolve = res;
|
|
96
|
+
reject = rej;
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
const entry: IPromiseEntry<T> = {
|
|
100
|
+
promise,
|
|
101
|
+
resolve: resolve!,
|
|
102
|
+
reject: reject!,
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
this.promises.set(path, entry as IPromiseEntry<unknown>);
|
|
106
|
+
|
|
107
|
+
// Check if this is a top-level step that has already completed
|
|
108
|
+
const parts = path.split('.');
|
|
109
|
+
const stepName = parts[0];
|
|
110
|
+
if (parts.length === 1 && stepName in this.realContext) {
|
|
111
|
+
// Step already completed, resolve immediately
|
|
112
|
+
entry.resolve(this.realContext[stepName] as T);
|
|
113
|
+
} else if (parts.length > 1 && stepName in this.realContext) {
|
|
114
|
+
// Nested property of a completed step
|
|
115
|
+
const value = this._getNestedValue(
|
|
116
|
+
this.realContext[stepName],
|
|
117
|
+
parts.slice(1).join('.'),
|
|
118
|
+
);
|
|
119
|
+
entry.resolve(value as T);
|
|
120
|
+
} else {
|
|
121
|
+
// Step hasn't completed yet, check if parent is already resolved
|
|
122
|
+
this._autoResolveIfParentResolved(path, entry as IPromiseEntry<unknown>);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
return entry;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* If parent path is already resolved, resolve this child path immediately
|
|
130
|
+
*/
|
|
131
|
+
private _autoResolveIfParentResolved(path: string, entry: IPromiseEntry): void {
|
|
132
|
+
const parts = path.split('.');
|
|
133
|
+
if (parts.length <= 1) return; // No parent
|
|
134
|
+
|
|
135
|
+
// Check each parent level from most specific to least
|
|
136
|
+
for (let i = parts.length - 1; i > 0; i--) {
|
|
137
|
+
const parentPath = parts.slice(0, i).join('.');
|
|
138
|
+
const parentEntry = this.promises.get(parentPath);
|
|
139
|
+
|
|
140
|
+
if (parentEntry) {
|
|
141
|
+
// Wait for parent to resolve, then resolve child
|
|
142
|
+
parentEntry.promise
|
|
143
|
+
.then(parentValue => {
|
|
144
|
+
// Navigate to the child value
|
|
145
|
+
const childPath = parts.slice(i).join('.');
|
|
146
|
+
const childValue = this._getNestedValue(parentValue, childPath);
|
|
147
|
+
|
|
148
|
+
// Resolve the child promise
|
|
149
|
+
entry.resolve(childValue);
|
|
150
|
+
})
|
|
151
|
+
.catch(error => {
|
|
152
|
+
// Parent rejected, reject child too
|
|
153
|
+
entry.reject(error as Error);
|
|
154
|
+
});
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Gets nested value from an object by path
|
|
162
|
+
*/
|
|
163
|
+
private _getNestedValue(obj: any, path: string): any {
|
|
164
|
+
const parts = path.split('.');
|
|
165
|
+
let current = obj;
|
|
166
|
+
for (const part of parts) {
|
|
167
|
+
if (current && typeof current === 'object') {
|
|
168
|
+
current = current[part];
|
|
169
|
+
} else {
|
|
170
|
+
return undefined;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
return current;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Checks if a promise exists for the given path
|
|
178
|
+
*/
|
|
179
|
+
has(path: string): boolean {
|
|
180
|
+
return this.promises.has(path);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Resolves all promises related to a step's output
|
|
185
|
+
*/
|
|
186
|
+
resolveStep(stepName: string, output: unknown): void {
|
|
187
|
+
// Resolve the main step promise
|
|
188
|
+
if (this.promises.has(stepName)) {
|
|
189
|
+
this.promises.get(stepName)!.resolve(output);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
// Resolve nested property promises
|
|
193
|
+
if (typeof output === 'object' && output !== null) {
|
|
194
|
+
this._resolveNestedProperties(stepName, output);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Recursively resolves promises for nested properties
|
|
200
|
+
*/
|
|
201
|
+
private _resolveNestedProperties(basePath: string, obj: any, depth = 0): void {
|
|
202
|
+
// Limit recursion depth to avoid infinite loops
|
|
203
|
+
if (depth > 10) return;
|
|
204
|
+
|
|
205
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
206
|
+
const nestedPath = `${basePath}.${key}`;
|
|
207
|
+
|
|
208
|
+
if (this.promises.has(nestedPath)) {
|
|
209
|
+
this.promises.get(nestedPath)!.resolve(value);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
// Recursively resolve deeper properties
|
|
213
|
+
if (typeof value === 'object' && value !== null) {
|
|
214
|
+
this._resolveNestedProperties(nestedPath, value, depth + 1);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Rejects a promise for a given path
|
|
221
|
+
*/
|
|
222
|
+
reject(path: string, error: Error): void {
|
|
223
|
+
if (this.promises.has(path)) {
|
|
224
|
+
this.promises.get(path)!.reject(error);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Creates a context proxy that returns thenable proxies for all properties
|
|
231
|
+
* except $meta, which is always available directly.
|
|
232
|
+
*
|
|
233
|
+
* Also tracks which properties are accessed for dependency detection.
|
|
234
|
+
*/
|
|
235
|
+
function createContextProxy(
|
|
236
|
+
realContext: Record<string, unknown>,
|
|
237
|
+
promiseManager: PromiseManager,
|
|
238
|
+
currentStep: string,
|
|
239
|
+
dependencyTracker: DependencyTracker,
|
|
240
|
+
): ITestContext {
|
|
241
|
+
return new Proxy(realContext as ITestContext, {
|
|
242
|
+
get(target: any, prop: string | symbol): any {
|
|
243
|
+
// Special case: $meta is always available directly
|
|
244
|
+
if (prop === '$meta') {
|
|
245
|
+
return target.$meta;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
// Track dependency if we're inside a step execution
|
|
249
|
+
if (currentStep && typeof prop === 'string') {
|
|
250
|
+
dependencyTracker.trackAccess(currentStep, prop);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
// Return thenable proxy for step outputs
|
|
254
|
+
if (typeof prop === 'string') {
|
|
255
|
+
return createThenableProxy(prop, promiseManager);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
return target[prop];
|
|
259
|
+
},
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/**
|
|
264
|
+
* Tracks dependency relationships between steps
|
|
265
|
+
*/
|
|
266
|
+
class DependencyTracker {
|
|
267
|
+
private dependencies = new Map<string, Set<string>>();
|
|
268
|
+
private validStepNames = new Set<string>();
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Sets the valid step names that can be referenced
|
|
272
|
+
*/
|
|
273
|
+
setValidStepNames(stepNames: Set<string>): void {
|
|
274
|
+
this.validStepNames = stepNames;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Records that a step accessed a property
|
|
279
|
+
*/
|
|
280
|
+
trackAccess(fromStep: string, property: string): void {
|
|
281
|
+
if (!this.dependencies.has(fromStep)) {
|
|
282
|
+
this.dependencies.set(fromStep, new Set());
|
|
283
|
+
}
|
|
284
|
+
this.dependencies.get(fromStep)!.add(property);
|
|
285
|
+
|
|
286
|
+
// Validate immediately if we have valid step names
|
|
287
|
+
if (this.validStepNames.size > 0) {
|
|
288
|
+
const stepName = property.split('.')[0];
|
|
289
|
+
if (!this.validStepNames.has(stepName)) {
|
|
290
|
+
throw new Error(
|
|
291
|
+
`Invalid step reference(s) detected: Step "${fromStep}" references "context.${property}", ` +
|
|
292
|
+
`but no step named "${stepName}" exists. ` +
|
|
293
|
+
`Available steps: ${Array.from(this.validStepNames).sort().join(', ')}`,
|
|
294
|
+
);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Gets all dependencies for a step
|
|
301
|
+
*/
|
|
302
|
+
getDependencies(stepName: string): string[] {
|
|
303
|
+
return Array.from(this.dependencies.get(stepName) || []);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
* Gets all dependency edges as graph edges
|
|
308
|
+
*/
|
|
309
|
+
getEdges(): IDependencyEdge[] {
|
|
310
|
+
const edges: IDependencyEdge[] = [];
|
|
311
|
+
|
|
312
|
+
for (const [from, properties] of this.dependencies.entries()) {
|
|
313
|
+
for (const property of properties) {
|
|
314
|
+
// Extract the base step name from the property path
|
|
315
|
+
const to = property.split('.')[0];
|
|
316
|
+
edges.push({from, to, property});
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
return edges;
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Captures source location information for error reporting
|
|
326
|
+
*/
|
|
327
|
+
function captureSourceLocation(fn: Function): ISourceLocation {
|
|
328
|
+
try {
|
|
329
|
+
const stack = new Error().stack || '';
|
|
330
|
+
const lines = stack.split('\n');
|
|
331
|
+
|
|
332
|
+
// Find the first line that's not from this file
|
|
333
|
+
for (let i = 2; i < lines.length; i++) {
|
|
334
|
+
const line = lines[i];
|
|
335
|
+
if (!line.includes('executor.ts') && !line.includes('executor.js')) {
|
|
336
|
+
// Try to parse: "at functionName (file:line:column)"
|
|
337
|
+
const match = line.match(/\((.+):(\d+):(\d+)\)/);
|
|
338
|
+
if (match) {
|
|
339
|
+
return {
|
|
340
|
+
file: match[1],
|
|
341
|
+
line: parseInt(match[2], 10),
|
|
342
|
+
column: parseInt(match[3], 10),
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
// Try alternative format: "at file:line:column"
|
|
347
|
+
const altMatch = line.match(/at (.+):(\d+):(\d+)/);
|
|
348
|
+
if (altMatch) {
|
|
349
|
+
return {
|
|
350
|
+
file: altMatch[1],
|
|
351
|
+
line: parseInt(altMatch[2], 10),
|
|
352
|
+
column: parseInt(altMatch[3], 10),
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
} catch (error) {
|
|
358
|
+
// If parsing fails, return unknown location
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
return {
|
|
362
|
+
file: 'unknown',
|
|
363
|
+
line: 0,
|
|
364
|
+
column: 0,
|
|
365
|
+
};
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* Main test executor class
|
|
370
|
+
*/
|
|
371
|
+
export class TestExecutor extends EventEmitter {
|
|
372
|
+
private config: Required<ITestExecutorConfig>;
|
|
373
|
+
private queue: PQueue;
|
|
374
|
+
private dependencyTracker = new DependencyTracker();
|
|
375
|
+
|
|
376
|
+
// Progress tracking
|
|
377
|
+
private progress: ITestProgress = {
|
|
378
|
+
testName: 'test',
|
|
379
|
+
startTime: 0,
|
|
380
|
+
status: 'pending',
|
|
381
|
+
totalSteps: 0,
|
|
382
|
+
completedSteps: 0,
|
|
383
|
+
failedSteps: 0,
|
|
384
|
+
steps: new Map(),
|
|
385
|
+
groups: [],
|
|
386
|
+
};
|
|
387
|
+
|
|
388
|
+
// Dependency graph
|
|
389
|
+
private graph: IDependencyGraph = {
|
|
390
|
+
nodes: new Map(),
|
|
391
|
+
edges: [],
|
|
392
|
+
};
|
|
393
|
+
|
|
394
|
+
// Latency tracking
|
|
395
|
+
private latencyMetrics = new Map<string, IStepLatency>();
|
|
396
|
+
|
|
397
|
+
// Real context (actual values)
|
|
398
|
+
private realContext: Record<string, unknown> = {};
|
|
399
|
+
|
|
400
|
+
// Promise manager (needs realContext, initialized in constructor)
|
|
401
|
+
private promiseManager: PromiseManager;
|
|
402
|
+
|
|
403
|
+
// Test framework context for nested test output
|
|
404
|
+
private testContext?: import('./test-types.js').ITestFrameworkContext;
|
|
405
|
+
|
|
406
|
+
// Track step names to detect duplicates
|
|
407
|
+
private stepNamesUsed = new Set<string>();
|
|
408
|
+
|
|
409
|
+
constructor(config: ITestExecutorConfig = {}) {
|
|
410
|
+
super();
|
|
411
|
+
|
|
412
|
+
this.config = {
|
|
413
|
+
concurrency: config.concurrency ?? 10,
|
|
414
|
+
captureStackTraces: config.captureStackTraces ?? false,
|
|
415
|
+
framework: config.framework,
|
|
416
|
+
};
|
|
417
|
+
|
|
418
|
+
this.queue = new PQueue({concurrency: this.config.concurrency});
|
|
419
|
+
|
|
420
|
+
// Initialize promise manager with reference to realContext
|
|
421
|
+
this.promiseManager = new PromiseManager(this.realContext);
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* Executes an array of test steps
|
|
426
|
+
*/
|
|
427
|
+
async execute(
|
|
428
|
+
steps: StepArray,
|
|
429
|
+
$meta: IMeta,
|
|
430
|
+
testContext?: import('./test-types.js').ITestFrameworkContext,
|
|
431
|
+
): Promise<void> {
|
|
432
|
+
// Store test context for nested execution
|
|
433
|
+
this.testContext = testContext;
|
|
434
|
+
|
|
435
|
+
// Clear and initialize context with $meta (preserve reference for PromiseManager)
|
|
436
|
+
Object.keys(this.realContext).forEach(key => delete this.realContext[key]);
|
|
437
|
+
this.realContext.$meta = $meta;
|
|
438
|
+
|
|
439
|
+
// Clear step name tracking for new test run
|
|
440
|
+
this.stepNamesUsed.clear();
|
|
441
|
+
|
|
442
|
+
// Initialize progress
|
|
443
|
+
this.progress.testName = steps.name || 'test';
|
|
444
|
+
this.progress.startTime = Date.now();
|
|
445
|
+
this.progress.status = 'running';
|
|
446
|
+
this.progress.completedSteps = 0;
|
|
447
|
+
this.progress.failedSteps = 0;
|
|
448
|
+
this.progress.steps.clear();
|
|
449
|
+
this.progress.groups = [];
|
|
450
|
+
|
|
451
|
+
// Reset dependency graph
|
|
452
|
+
this.graph.nodes.clear();
|
|
453
|
+
this.graph.edges = [];
|
|
454
|
+
|
|
455
|
+
// Reset latency metrics
|
|
456
|
+
this.latencyMetrics.clear();
|
|
457
|
+
|
|
458
|
+
// Count total steps and collect step names
|
|
459
|
+
this.progress.totalSteps = this._countSteps(steps);
|
|
460
|
+
const allStepNames = this._collectStepNames(steps);
|
|
461
|
+
|
|
462
|
+
// Set valid step names for dependency validation
|
|
463
|
+
this.dependencyTracker.setValidStepNames(allStepNames);
|
|
464
|
+
|
|
465
|
+
// Emit test start event
|
|
466
|
+
this.emit('test:start', this.progress);
|
|
467
|
+
|
|
468
|
+
try {
|
|
469
|
+
// Execute all steps
|
|
470
|
+
await this._executeSteps(steps, [], this.testContext as any);
|
|
471
|
+
|
|
472
|
+
// Mark as completed
|
|
473
|
+
this.progress.status = 'completed';
|
|
474
|
+
this.progress.endTime = Date.now();
|
|
475
|
+
|
|
476
|
+
// Build final dependency graph
|
|
477
|
+
this.graph.edges = this.dependencyTracker.getEdges();
|
|
478
|
+
} catch (error) {
|
|
479
|
+
this.progress.status = 'failed';
|
|
480
|
+
this.progress.endTime = Date.now();
|
|
481
|
+
throw error;
|
|
482
|
+
} finally {
|
|
483
|
+
this.emit('test:end', this.progress);
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
/**
|
|
488
|
+
* Recursively executes steps, handling both functions and nested arrays
|
|
489
|
+
*/
|
|
490
|
+
private async _executeSteps(
|
|
491
|
+
steps: StepArray,
|
|
492
|
+
groupPath: string[],
|
|
493
|
+
parentTestContext?: unknown,
|
|
494
|
+
): Promise<void> {
|
|
495
|
+
const stepPromises: Promise<void>[] = [];
|
|
496
|
+
|
|
497
|
+
for (const step of steps) {
|
|
498
|
+
if (Array.isArray(step)) {
|
|
499
|
+
// Check if it's an empty array (checkpoint)
|
|
500
|
+
if (step.length === 0) {
|
|
501
|
+
// Checkpoint: wait for all parallel steps to complete before continuing
|
|
502
|
+
await Promise.all(stepPromises);
|
|
503
|
+
stepPromises.length = 0;
|
|
504
|
+
continue;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
// Nested array - wait for current level to complete first
|
|
508
|
+
await Promise.all(stepPromises);
|
|
509
|
+
stepPromises.length = 0;
|
|
510
|
+
|
|
511
|
+
const nestedGroupPath = [...groupPath, step.name || `group-${groupPath.length}`];
|
|
512
|
+
|
|
513
|
+
// If we have a test context, use it to create nested test scope
|
|
514
|
+
if (this.testContext && parentTestContext) {
|
|
515
|
+
const nestedName = step.name || `group-${groupPath.length}`;
|
|
516
|
+
await (this.testContext.test as any).call(
|
|
517
|
+
parentTestContext,
|
|
518
|
+
nestedName,
|
|
519
|
+
async (nestedContext: unknown) => {
|
|
520
|
+
await this._executeSteps(step, nestedGroupPath, nestedContext);
|
|
521
|
+
},
|
|
522
|
+
);
|
|
523
|
+
} else if (this.testContext && groupPath.length === 0) {
|
|
524
|
+
// Top-level nested array
|
|
525
|
+
const nestedName = step.name || `group-${groupPath.length}`;
|
|
526
|
+
await this.testContext.test(nestedName, async (nestedContext: unknown) => {
|
|
527
|
+
await this._executeSteps(step, nestedGroupPath, nestedContext);
|
|
528
|
+
});
|
|
529
|
+
} else {
|
|
530
|
+
// No test context, execute directly
|
|
531
|
+
await this._executeSteps(step, nestedGroupPath, parentTestContext);
|
|
532
|
+
}
|
|
533
|
+
} else if (typeof step === 'function') {
|
|
534
|
+
// Execute function step in parallel
|
|
535
|
+
const promise = this._executeStep(step, groupPath, parentTestContext);
|
|
536
|
+
stepPromises.push(promise);
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
// Wait for remaining steps at this level
|
|
541
|
+
await Promise.all(stepPromises);
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* Executes a single step function
|
|
546
|
+
*/
|
|
547
|
+
private async _executeStep(
|
|
548
|
+
fn: StepFunction,
|
|
549
|
+
groupPath: string[],
|
|
550
|
+
parentTestContext?: unknown,
|
|
551
|
+
): Promise<void> {
|
|
552
|
+
const stepName = fn.name || 'anonymous';
|
|
553
|
+
|
|
554
|
+
// Check for duplicate step names
|
|
555
|
+
this._checkForDuplicateStepName(stepName);
|
|
556
|
+
|
|
557
|
+
// Capture source location if enabled
|
|
558
|
+
const sourceLocation = this.config.captureStackTraces
|
|
559
|
+
? captureSourceLocation(fn)
|
|
560
|
+
: undefined;
|
|
561
|
+
|
|
562
|
+
// Initialize step progress
|
|
563
|
+
const stepProgress: IStepProgress = {
|
|
564
|
+
stepName,
|
|
565
|
+
displayName: stepName,
|
|
566
|
+
groupPath,
|
|
567
|
+
status: 'pending',
|
|
568
|
+
dependencies: [],
|
|
569
|
+
dependents: [],
|
|
570
|
+
sourceLocation,
|
|
571
|
+
};
|
|
572
|
+
|
|
573
|
+
this.progress.steps.set(stepName, stepProgress);
|
|
574
|
+
|
|
575
|
+
// Initialize dependency graph node
|
|
576
|
+
this.graph.nodes.set(stepName, {
|
|
577
|
+
stepName,
|
|
578
|
+
groupPath,
|
|
579
|
+
status: 'pending',
|
|
580
|
+
});
|
|
581
|
+
|
|
582
|
+
// Initialize latency tracking
|
|
583
|
+
const latency: IStepLatency = {
|
|
584
|
+
stepName,
|
|
585
|
+
queuedAt: Date.now(),
|
|
586
|
+
queueTime: 0,
|
|
587
|
+
waitTime: 0,
|
|
588
|
+
executionTime: 0,
|
|
589
|
+
totalTime: 0,
|
|
590
|
+
};
|
|
591
|
+
this.latencyMetrics.set(stepName, latency);
|
|
592
|
+
|
|
593
|
+
// Wrap execution function for potential test context wrapping
|
|
594
|
+
const executeStepFn = async () => {
|
|
595
|
+
latency.startedAt = Date.now();
|
|
596
|
+
latency.queueTime = latency.startedAt - latency.queuedAt;
|
|
597
|
+
|
|
598
|
+
stepProgress.status = 'running';
|
|
599
|
+
stepProgress.startTime = latency.startedAt;
|
|
600
|
+
this.graph.nodes.get(stepName)!.status = 'running';
|
|
601
|
+
this.graph.nodes.get(stepName)!.startTime = latency.startedAt;
|
|
602
|
+
|
|
603
|
+
this.emit('step:start', stepName, stepProgress);
|
|
604
|
+
|
|
605
|
+
try {
|
|
606
|
+
// Create tracking context
|
|
607
|
+
const context = createContextProxy(
|
|
608
|
+
this.realContext,
|
|
609
|
+
this.promiseManager,
|
|
610
|
+
stepName,
|
|
611
|
+
this.dependencyTracker,
|
|
612
|
+
);
|
|
613
|
+
|
|
614
|
+
// Execute the step
|
|
615
|
+
const result = await fn(assert, context);
|
|
616
|
+
|
|
617
|
+
// Store result in real context
|
|
618
|
+
this.realContext[stepName] = result;
|
|
619
|
+
|
|
620
|
+
// Resolve all promises for this step
|
|
621
|
+
this.promiseManager.resolveStep(stepName, result);
|
|
622
|
+
|
|
623
|
+
// Update progress - calculate latency metrics
|
|
624
|
+
latency.completedAt = Date.now();
|
|
625
|
+
latency.totalTime = latency.completedAt - latency.queuedAt;
|
|
626
|
+
latency.executionTime = latency.completedAt - latency.startedAt;
|
|
627
|
+
latency.queueTime = latency.startedAt - latency.queuedAt;
|
|
628
|
+
latency.waitTime = 0; // TODO: More sophisticated wait time tracking
|
|
629
|
+
|
|
630
|
+
stepProgress.status = 'completed';
|
|
631
|
+
stepProgress.endTime = latency.completedAt;
|
|
632
|
+
stepProgress.duration = latency.totalTime;
|
|
633
|
+
stepProgress.queueTime = latency.queueTime;
|
|
634
|
+
stepProgress.executionTime = latency.executionTime;
|
|
635
|
+
stepProgress.waitTime = latency.waitTime;
|
|
636
|
+
stepProgress.result = result;
|
|
637
|
+
stepProgress.dependencies = this.dependencyTracker.getDependencies(stepName);
|
|
638
|
+
|
|
639
|
+
this.graph.nodes.get(stepName)!.status = 'completed';
|
|
640
|
+
this.graph.nodes.get(stepName)!.endTime = latency.completedAt;
|
|
641
|
+
|
|
642
|
+
this.progress.completedSteps++;
|
|
643
|
+
this.emit('step:end', stepName, stepProgress);
|
|
644
|
+
} catch (error) {
|
|
645
|
+
// Handle error
|
|
646
|
+
latency.completedAt = Date.now();
|
|
647
|
+
latency.totalTime = latency.completedAt - latency.queuedAt;
|
|
648
|
+
latency.executionTime = latency.completedAt - latency.startedAt;
|
|
649
|
+
latency.queueTime = latency.startedAt - latency.queuedAt;
|
|
650
|
+
latency.waitTime = 0;
|
|
651
|
+
|
|
652
|
+
stepProgress.status = 'failed';
|
|
653
|
+
stepProgress.endTime = latency.completedAt;
|
|
654
|
+
stepProgress.duration = latency.totalTime;
|
|
655
|
+
stepProgress.dependencies = this.dependencyTracker.getDependencies(stepName);
|
|
656
|
+
|
|
657
|
+
const stepError: IStepError = {
|
|
658
|
+
message: (error as Error).message,
|
|
659
|
+
stack: (error as Error).stack || '',
|
|
660
|
+
context: {...this.realContext},
|
|
661
|
+
};
|
|
662
|
+
stepProgress.error = stepError;
|
|
663
|
+
|
|
664
|
+
this.graph.nodes.get(stepName)!.status = 'failed';
|
|
665
|
+
this.graph.nodes.get(stepName)!.endTime = latency.completedAt;
|
|
666
|
+
this.graph.nodes.get(stepName)!.error = error as Error;
|
|
667
|
+
|
|
668
|
+
this.progress.failedSteps++;
|
|
669
|
+
this.emit('step:error', stepName, error as Error, stepProgress);
|
|
670
|
+
|
|
671
|
+
// Reject promises for this step
|
|
672
|
+
this.promiseManager.reject(stepName, error as Error);
|
|
673
|
+
|
|
674
|
+
throw error;
|
|
675
|
+
}
|
|
676
|
+
};
|
|
677
|
+
|
|
678
|
+
// If we have test context, wrap in nested test
|
|
679
|
+
if (this.testContext && parentTestContext) {
|
|
680
|
+
await this.queue.add(async () => {
|
|
681
|
+
try {
|
|
682
|
+
await (this.testContext!.test as any).call(
|
|
683
|
+
parentTestContext,
|
|
684
|
+
stepName,
|
|
685
|
+
async () => {
|
|
686
|
+
await executeStepFn();
|
|
687
|
+
},
|
|
688
|
+
);
|
|
689
|
+
} catch (error) {
|
|
690
|
+
// Error already handled in executeStepFn, don't rethrow to break the queue
|
|
691
|
+
// The test framework will report it
|
|
692
|
+
}
|
|
693
|
+
});
|
|
694
|
+
} else if (this.testContext && groupPath.length === 0) {
|
|
695
|
+
// Top-level step with test context
|
|
696
|
+
await this.queue.add(async () => {
|
|
697
|
+
try {
|
|
698
|
+
await this.testContext!.test(stepName, async () => {
|
|
699
|
+
await executeStepFn();
|
|
700
|
+
});
|
|
701
|
+
} catch (error) {
|
|
702
|
+
// Error already handled in executeStepFn, don't rethrow to break the queue
|
|
703
|
+
}
|
|
704
|
+
});
|
|
705
|
+
} else {
|
|
706
|
+
// No test context or not at top level
|
|
707
|
+
await this.queue.add(executeStepFn);
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
/**
|
|
712
|
+
* Counts total number of steps (including nested)
|
|
713
|
+
*/
|
|
714
|
+
private _countSteps(steps: StepArray): number {
|
|
715
|
+
let count = 0;
|
|
716
|
+
|
|
717
|
+
for (const step of steps) {
|
|
718
|
+
if (Array.isArray(step)) {
|
|
719
|
+
count += this._countSteps(step);
|
|
720
|
+
} else if (typeof step === 'function') {
|
|
721
|
+
count++;
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
return count;
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
/**
|
|
729
|
+
* Collects all step names (including nested)
|
|
730
|
+
*/
|
|
731
|
+
private _collectStepNames(steps: StepArray): Set<string> {
|
|
732
|
+
const stepNames = new Set<string>();
|
|
733
|
+
|
|
734
|
+
for (const step of steps) {
|
|
735
|
+
if (Array.isArray(step)) {
|
|
736
|
+
// Recursively collect from nested arrays
|
|
737
|
+
const nested = this._collectStepNames(step);
|
|
738
|
+
nested.forEach(name => stepNames.add(name));
|
|
739
|
+
} else if (typeof step === 'function') {
|
|
740
|
+
const stepName = step.name || 'anonymous';
|
|
741
|
+
stepNames.add(stepName);
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
return stepNames;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
/**
|
|
749
|
+
* Checks for duplicate step names and throws an error if found
|
|
750
|
+
*/
|
|
751
|
+
private _checkForDuplicateStepName(stepName: string): void {
|
|
752
|
+
if (this.stepNamesUsed.has(stepName)) {
|
|
753
|
+
throw new Error(
|
|
754
|
+
`Duplicate step name detected: "${stepName}". ` +
|
|
755
|
+
`Each step must have a unique function name within the same test context.`,
|
|
756
|
+
);
|
|
757
|
+
}
|
|
758
|
+
this.stepNamesUsed.add(stepName);
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
/**
|
|
762
|
+
* Gets the current progress snapshot
|
|
763
|
+
*/
|
|
764
|
+
getProgress(): ITestProgress {
|
|
765
|
+
return this.progress;
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
/**
|
|
769
|
+
* Gets the dependency graph
|
|
770
|
+
*/
|
|
771
|
+
getDependencyGraph(): IDependencyGraph {
|
|
772
|
+
return this.graph;
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
/**
|
|
776
|
+
* Gets latency metrics
|
|
777
|
+
*/
|
|
778
|
+
getLatencyReport(): ITestLatency {
|
|
779
|
+
const totalDuration = this.progress.endTime
|
|
780
|
+
? this.progress.endTime - this.progress.startTime
|
|
781
|
+
: 0;
|
|
782
|
+
|
|
783
|
+
// Calculate critical path
|
|
784
|
+
const criticalPath = this._calculateCriticalPath();
|
|
785
|
+
|
|
786
|
+
// Calculate parallel efficiency
|
|
787
|
+
const totalStepTime = Array.from(this.latencyMetrics.values()).reduce(
|
|
788
|
+
(sum, l) => sum + l.executionTime,
|
|
789
|
+
0,
|
|
790
|
+
);
|
|
791
|
+
const parallelEfficiency = totalDuration > 0 ? totalStepTime / totalDuration : 0;
|
|
792
|
+
|
|
793
|
+
// Identify bottlenecks
|
|
794
|
+
const bottlenecks = this._identifyBottlenecks();
|
|
795
|
+
|
|
796
|
+
return {
|
|
797
|
+
testName: this.progress.testName,
|
|
798
|
+
totalDuration,
|
|
799
|
+
steps: this.latencyMetrics,
|
|
800
|
+
criticalPath,
|
|
801
|
+
parallelEfficiency,
|
|
802
|
+
bottlenecks,
|
|
803
|
+
};
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
/**
|
|
807
|
+
* Calculates the critical path (longest dependency chain)
|
|
808
|
+
*/
|
|
809
|
+
private _calculateCriticalPath(): string[] {
|
|
810
|
+
// Build adjacency list
|
|
811
|
+
const adjacency = new Map<string, string[]>();
|
|
812
|
+
for (const edge of this.graph.edges) {
|
|
813
|
+
if (!adjacency.has(edge.to)) {
|
|
814
|
+
adjacency.set(edge.to, []);
|
|
815
|
+
}
|
|
816
|
+
adjacency.get(edge.to)!.push(edge.from);
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
// Find longest path using DFS
|
|
820
|
+
const visited = new Set<string>();
|
|
821
|
+
let longestPath: string[] = [];
|
|
822
|
+
|
|
823
|
+
const dfs = (node: string, path: string[]): void => {
|
|
824
|
+
if (visited.has(node)) return;
|
|
825
|
+
visited.add(node);
|
|
826
|
+
|
|
827
|
+
const newPath = [...path, node];
|
|
828
|
+
|
|
829
|
+
const children = adjacency.get(node) || [];
|
|
830
|
+
if (children.length === 0) {
|
|
831
|
+
// Leaf node - check if this is the longest path
|
|
832
|
+
if (newPath.length > longestPath.length) {
|
|
833
|
+
longestPath = newPath;
|
|
834
|
+
}
|
|
835
|
+
} else {
|
|
836
|
+
for (const child of children) {
|
|
837
|
+
dfs(child, newPath);
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
visited.delete(node);
|
|
842
|
+
};
|
|
843
|
+
|
|
844
|
+
// Start DFS from all roots (nodes with no dependencies)
|
|
845
|
+
const allNodes = new Set(this.graph.nodes.keys());
|
|
846
|
+
const dependentNodes = new Set(this.graph.edges.map(e => e.from));
|
|
847
|
+
const roots = Array.from(allNodes).filter(n => !dependentNodes.has(n));
|
|
848
|
+
|
|
849
|
+
for (const root of roots) {
|
|
850
|
+
dfs(root, []);
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
return longestPath.reverse(); // Reverse to get correct order
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
/**
|
|
857
|
+
* Identifies bottleneck steps that blocked many other steps
|
|
858
|
+
*/
|
|
859
|
+
private _identifyBottlenecks(): Array<{
|
|
860
|
+
stepName: string;
|
|
861
|
+
executionTime: number;
|
|
862
|
+
blockedSteps: string[];
|
|
863
|
+
}> {
|
|
864
|
+
const bottlenecks: Map<string, Set<string>> = new Map();
|
|
865
|
+
|
|
866
|
+
// Count how many steps each step blocks
|
|
867
|
+
for (const edge of this.graph.edges) {
|
|
868
|
+
if (!bottlenecks.has(edge.to)) {
|
|
869
|
+
bottlenecks.set(edge.to, new Set());
|
|
870
|
+
}
|
|
871
|
+
bottlenecks.get(edge.to)!.add(edge.from);
|
|
872
|
+
}
|
|
873
|
+
|
|
874
|
+
// Sort by number of blocked steps
|
|
875
|
+
const result = Array.from(bottlenecks.entries())
|
|
876
|
+
.map(([stepName, blockedSteps]) => ({
|
|
877
|
+
stepName,
|
|
878
|
+
executionTime: this.latencyMetrics.get(stepName)?.executionTime || 0,
|
|
879
|
+
blockedSteps: Array.from(blockedSteps),
|
|
880
|
+
}))
|
|
881
|
+
.sort((a, b) => b.blockedSteps.length - a.blockedSteps.length)
|
|
882
|
+
.slice(0, 5); // Top 5 bottlenecks
|
|
883
|
+
|
|
884
|
+
return result;
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
/**
|
|
888
|
+
* Type-safe event emitter
|
|
889
|
+
*/
|
|
890
|
+
on<E extends keyof ITestEvents>(event: E, handler: ITestEvents[E]): this {
|
|
891
|
+
return super.on(event, handler as any);
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
emit<E extends keyof ITestEvents>(event: E, ...args: Parameters<ITestEvents[E]>): boolean {
|
|
895
|
+
return super.emit(event, ...args);
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
|
|
899
|
+
// Export all types
|
|
900
|
+
export type * from './test-types.js';
|
package/package.json
CHANGED
package/test-types.ts
ADDED
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type definitions for the Blong parallel test framework
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
// ============================================================================
|
|
6
|
+
// Step Function Types
|
|
7
|
+
// ============================================================================
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Context object passed to test step functions.
|
|
11
|
+
* All properties except $meta are thenable proxies that must be awaited.
|
|
12
|
+
*/
|
|
13
|
+
export interface ITestContext {
|
|
14
|
+
/** Meta information - always available directly (not a thenable proxy) */
|
|
15
|
+
$meta: IMeta;
|
|
16
|
+
/** Dynamic properties added by completed steps - accessed via thenable proxies */
|
|
17
|
+
[key: string]: unknown;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* A single test step function
|
|
22
|
+
* @param assert - Assertion functions from node:assert or tap
|
|
23
|
+
* @param context - Test context with $meta and outputs from previous steps
|
|
24
|
+
* @returns The output to be stored in context under the function's name
|
|
25
|
+
*/
|
|
26
|
+
export type StepFunction = (assert: unknown, context: ITestContext) => unknown | Promise<unknown>;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Array of test steps that can be nested for sequential execution
|
|
30
|
+
*/
|
|
31
|
+
export type StepArray = (StepFunction | StepArray)[] & {name?: string};
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Meta information passed through test execution
|
|
35
|
+
*/
|
|
36
|
+
export interface IMeta {
|
|
37
|
+
/** Optional concurrency limit for parallel step execution */
|
|
38
|
+
concurrency?: number;
|
|
39
|
+
/** Additional metadata properties */
|
|
40
|
+
[key: string]: unknown;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Test framework context (e.g., from node:test or tap)
|
|
45
|
+
* Enables nested test output with automatic indentation
|
|
46
|
+
*/
|
|
47
|
+
export interface ITestFrameworkContext {
|
|
48
|
+
/** Creates a nested test scope for proper indentation */
|
|
49
|
+
test: (name: string, fn: (t: unknown) => void | Promise<void>) => unknown;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// ============================================================================
|
|
53
|
+
// Thenable Proxy Types
|
|
54
|
+
// ============================================================================
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* A thenable proxy that acts as both a Promise and supports property access.
|
|
58
|
+
* Used for automatic dependency detection in test steps.
|
|
59
|
+
*
|
|
60
|
+
* Note: This is a conceptual type. The actual implementation uses Proxy objects
|
|
61
|
+
* that intercept property access. TypeScript cannot perfectly represent this pattern.
|
|
62
|
+
*/
|
|
63
|
+
export type IThenableProxy<T = unknown> = Promise<T> & {
|
|
64
|
+
/** Access nested properties, returning more thenable proxies */
|
|
65
|
+
[key: string]: IThenableProxy<unknown>;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Promise resolution tracking for a specific context path
|
|
70
|
+
*/
|
|
71
|
+
export interface IPromiseEntry<T = unknown> {
|
|
72
|
+
/** The actual promise that resolves when the step completes */
|
|
73
|
+
promise: Promise<T>;
|
|
74
|
+
/** Function to resolve the promise with a value */
|
|
75
|
+
resolve: (value: T) => void;
|
|
76
|
+
/** Function to reject the promise with an error */
|
|
77
|
+
reject: (error: Error) => void;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// ============================================================================
|
|
81
|
+
// Step Definition Types
|
|
82
|
+
// ============================================================================
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Complete definition of a test step including metadata
|
|
86
|
+
*/
|
|
87
|
+
export interface IStepDefinition {
|
|
88
|
+
/** The step function to execute */
|
|
89
|
+
fn: StepFunction;
|
|
90
|
+
/** The step's display name (function name or custom name) */
|
|
91
|
+
name: string;
|
|
92
|
+
/** Source code location where this step was defined */
|
|
93
|
+
sourceLocation: ISourceLocation;
|
|
94
|
+
/** Parent group hierarchy */
|
|
95
|
+
groupPath: string[];
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Source code location information
|
|
100
|
+
*/
|
|
101
|
+
export interface ISourceLocation {
|
|
102
|
+
/** Absolute file path */
|
|
103
|
+
file: string;
|
|
104
|
+
/** Line number (1-indexed) */
|
|
105
|
+
line: number;
|
|
106
|
+
/** Column number (1-indexed) */
|
|
107
|
+
column: number;
|
|
108
|
+
/** Optional code snippet for context */
|
|
109
|
+
snippet?: string;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// ============================================================================
|
|
113
|
+
// Dependency Graph Types
|
|
114
|
+
// ============================================================================
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Graph structure tracking dependencies between test steps
|
|
118
|
+
*/
|
|
119
|
+
export interface IDependencyGraph {
|
|
120
|
+
/** All steps in the test as graph nodes */
|
|
121
|
+
nodes: Map<string, IDependencyNode>;
|
|
122
|
+
/** Dependency relationships between steps */
|
|
123
|
+
edges: IDependencyEdge[];
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* A single node in the dependency graph
|
|
128
|
+
*/
|
|
129
|
+
export interface IDependencyNode {
|
|
130
|
+
/** Step name (unique identifier) */
|
|
131
|
+
stepName: string;
|
|
132
|
+
/** Hierarchy of group names this step belongs to */
|
|
133
|
+
groupPath: string[];
|
|
134
|
+
/** When step execution started (timestamp) */
|
|
135
|
+
startTime?: number;
|
|
136
|
+
/** When step execution finished (timestamp) */
|
|
137
|
+
endTime?: number;
|
|
138
|
+
/** Current execution status */
|
|
139
|
+
status: 'pending' | 'running' | 'completed' | 'failed';
|
|
140
|
+
/** Error if step failed */
|
|
141
|
+
error?: Error;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* An edge representing a dependency relationship
|
|
146
|
+
*/
|
|
147
|
+
export interface IDependencyEdge {
|
|
148
|
+
/** Step that depends on another step */
|
|
149
|
+
from: string;
|
|
150
|
+
/** Step being depended on */
|
|
151
|
+
to: string;
|
|
152
|
+
/** Which context property/path was accessed */
|
|
153
|
+
property: string;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// ============================================================================
|
|
157
|
+
// Progress Tracking Types
|
|
158
|
+
// ============================================================================
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Overall test execution progress
|
|
162
|
+
*/
|
|
163
|
+
export interface ITestProgress {
|
|
164
|
+
/** Test name */
|
|
165
|
+
testName: string;
|
|
166
|
+
/** Test start time */
|
|
167
|
+
startTime: number;
|
|
168
|
+
/** Test end time (when all steps complete) */
|
|
169
|
+
endTime?: number;
|
|
170
|
+
/** Overall test status */
|
|
171
|
+
status: 'pending' | 'running' | 'completed' | 'failed';
|
|
172
|
+
/** Total number of steps in the test */
|
|
173
|
+
totalSteps: number;
|
|
174
|
+
/** Number of completed steps */
|
|
175
|
+
completedSteps: number;
|
|
176
|
+
/** Number of failed steps */
|
|
177
|
+
failedSteps: number;
|
|
178
|
+
/** Progress details for each step */
|
|
179
|
+
steps: Map<string, IStepProgress>;
|
|
180
|
+
/** Group hierarchy information */
|
|
181
|
+
groups: IGroupProgress[];
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Progress information for a single step
|
|
186
|
+
*/
|
|
187
|
+
export interface IStepProgress {
|
|
188
|
+
/** Step name */
|
|
189
|
+
stepName: string;
|
|
190
|
+
/** Display name (may differ from stepName for reused tests) */
|
|
191
|
+
displayName: string;
|
|
192
|
+
/** Group hierarchy path */
|
|
193
|
+
groupPath: string[];
|
|
194
|
+
/** Current step status */
|
|
195
|
+
status: 'pending' | 'running' | 'completed' | 'failed';
|
|
196
|
+
/** When step started executing */
|
|
197
|
+
startTime?: number;
|
|
198
|
+
/** When step finished executing */
|
|
199
|
+
endTime?: number;
|
|
200
|
+
/** Total duration (end - start) */
|
|
201
|
+
duration?: number;
|
|
202
|
+
/** Time spent waiting in queue before execution */
|
|
203
|
+
queueTime?: number;
|
|
204
|
+
/** Time spent actually executing the step function */
|
|
205
|
+
executionTime?: number;
|
|
206
|
+
/** Time spent waiting for dependencies to resolve */
|
|
207
|
+
waitTime?: number;
|
|
208
|
+
/** Steps this step depends on */
|
|
209
|
+
dependencies: string[];
|
|
210
|
+
/** Steps that depend on this step */
|
|
211
|
+
dependents: string[];
|
|
212
|
+
/** Source code location */
|
|
213
|
+
sourceLocation?: ISourceLocation;
|
|
214
|
+
/** Step output/result */
|
|
215
|
+
result?: unknown;
|
|
216
|
+
/** Error information if step failed */
|
|
217
|
+
error?: IStepError;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Error information with enhanced context
|
|
222
|
+
*/
|
|
223
|
+
export interface IStepError {
|
|
224
|
+
/** Error message */
|
|
225
|
+
message: string;
|
|
226
|
+
/** Stack trace */
|
|
227
|
+
stack: string;
|
|
228
|
+
/** Context snapshot at time of failure */
|
|
229
|
+
context: Record<string, unknown>;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Progress information for a group of steps
|
|
234
|
+
*/
|
|
235
|
+
export interface IGroupProgress {
|
|
236
|
+
/** Group name */
|
|
237
|
+
groupName: string;
|
|
238
|
+
/** Hierarchy path */
|
|
239
|
+
path: string[];
|
|
240
|
+
/** Group status */
|
|
241
|
+
status: 'pending' | 'running' | 'completed' | 'failed';
|
|
242
|
+
/** Step names in this group */
|
|
243
|
+
steps: string[];
|
|
244
|
+
/** Total steps in group */
|
|
245
|
+
totalSteps: number;
|
|
246
|
+
/** Completed steps in group */
|
|
247
|
+
completedSteps: number;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
// ============================================================================
|
|
251
|
+
// Latency Tracking Types
|
|
252
|
+
// ============================================================================
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Detailed timing information for a step
|
|
256
|
+
*/
|
|
257
|
+
export interface IStepLatency {
|
|
258
|
+
/** Step name */
|
|
259
|
+
stepName: string;
|
|
260
|
+
/** When step was added to queue */
|
|
261
|
+
queuedAt: number;
|
|
262
|
+
/** When step execution started */
|
|
263
|
+
startedAt?: number;
|
|
264
|
+
/** When step execution completed */
|
|
265
|
+
completedAt?: number;
|
|
266
|
+
/** Time from queue entry to execution start */
|
|
267
|
+
queueTime: number;
|
|
268
|
+
/** Time spent waiting for dependencies */
|
|
269
|
+
waitTime: number;
|
|
270
|
+
/** Actual execution time (excludes wait time) */
|
|
271
|
+
executionTime: number;
|
|
272
|
+
/** Total time from queue to completion */
|
|
273
|
+
totalTime: number;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* Aggregate latency metrics for entire test
|
|
278
|
+
*/
|
|
279
|
+
export interface ITestLatency {
|
|
280
|
+
/** Test name */
|
|
281
|
+
testName: string;
|
|
282
|
+
/** Total wall-clock duration */
|
|
283
|
+
totalDuration: number;
|
|
284
|
+
/** Latency details for each step */
|
|
285
|
+
steps: Map<string, IStepLatency>;
|
|
286
|
+
/** Steps on the critical path (longest dependency chain) */
|
|
287
|
+
criticalPath: string[];
|
|
288
|
+
/** Ratio of parallel efficiency (total step time / wall clock time) */
|
|
289
|
+
parallelEfficiency: number;
|
|
290
|
+
/** Steps that blocked the most other steps */
|
|
291
|
+
bottlenecks: Array<{
|
|
292
|
+
stepName: string;
|
|
293
|
+
executionTime: number;
|
|
294
|
+
blockedSteps: string[];
|
|
295
|
+
}>;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
// ============================================================================
|
|
299
|
+
// Event Types
|
|
300
|
+
// ============================================================================
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Event emitter interface for progress notifications
|
|
304
|
+
*/
|
|
305
|
+
export interface ITestEvents {
|
|
306
|
+
'test:start': (progress: ITestProgress) => void;
|
|
307
|
+
'test:end': (progress: ITestProgress) => void;
|
|
308
|
+
'step:start': (stepName: string, progress: IStepProgress) => void;
|
|
309
|
+
'step:end': (stepName: string, progress: IStepProgress) => void;
|
|
310
|
+
'step:error': (stepName: string, error: Error, progress: IStepProgress) => void;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
// ============================================================================
|
|
314
|
+
// Test Executor Configuration
|
|
315
|
+
// ============================================================================
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Configuration for the parallel test executor
|
|
319
|
+
*/
|
|
320
|
+
export interface ITestExecutorConfig {
|
|
321
|
+
/** Maximum number of steps to run in parallel */
|
|
322
|
+
concurrency?: number;
|
|
323
|
+
/** Whether to capture stack traces (performance impact) */
|
|
324
|
+
captureStackTraces?: boolean;
|
|
325
|
+
/** Test framework to use (tap, node:test, etc.) */
|
|
326
|
+
framework?: unknown;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* Test executor interface
|
|
331
|
+
*/
|
|
332
|
+
export interface ITestExecutor {
|
|
333
|
+
/** Execute test steps */
|
|
334
|
+
execute(steps: StepArray, $meta: IMeta, testContext?: ITestFrameworkContext): Promise<void>;
|
|
335
|
+
/** Get current progress snapshot */
|
|
336
|
+
getProgress(): ITestProgress;
|
|
337
|
+
/** Get dependency graph */
|
|
338
|
+
getDependencyGraph(): IDependencyGraph;
|
|
339
|
+
/** Get latency metrics */
|
|
340
|
+
getLatencyReport(): ITestLatency;
|
|
341
|
+
/** Register event listener */
|
|
342
|
+
on<E extends keyof ITestEvents>(event: E, handler: ITestEvents[E]): void;
|
|
343
|
+
}
|