@nsxbet/playwright-orchestrator 1.1.0 → 2.0.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/dist/reporter.js DELETED
@@ -1,343 +0,0 @@
1
- /**
2
- * Playwright Orchestrator Reporter
3
- *
4
- * A custom Playwright reporter that provides clean output for sharded tests.
5
- * Shows only tests assigned to the current shard, with proper counts and summaries.
6
- *
7
- * Features:
8
- * - Correct "Running X tests" count (only shard tests, not total)
9
- * - Clean output showing only shard tests (no skipped noise)
10
- * - Debug mode to see filtered tests
11
- * - Compatible with other reporters (json, html)
12
- *
13
- * Usage:
14
- * 1. Add to playwright.config.ts:
15
- * reporter: [['@nsxbet/playwright-orchestrator/reporter'], ['json', {...}]]
16
- * 2. Set ORCHESTRATOR_SHARD_FILE env var to path of JSON file with test IDs
17
- *
18
- * Environment variables:
19
- * - ORCHESTRATOR_SHARD_FILE: Path to JSON file with array of test IDs
20
- * - ORCHESTRATOR_DEBUG: Set to "1" to show filtered tests
21
- *
22
- * @module @nsxbet/playwright-orchestrator/reporter
23
- */
24
- import * as fs from 'node:fs';
25
- import * as path from 'node:path';
26
- import { buildTestIdFromRuntime, filterRuntimeTitlePath, } from './core/test-id.js';
27
- // ANSI color codes
28
- const colors = {
29
- green: '\x1b[32m',
30
- red: '\x1b[31m',
31
- yellow: '\x1b[33m',
32
- gray: '\x1b[90m',
33
- reset: '\x1b[0m',
34
- bold: '\x1b[1m',
35
- };
36
- // Check if colors should be used
37
- const useColors = process.env.FORCE_COLOR !== '0' &&
38
- process.env.NO_COLOR === undefined &&
39
- process.stdout.isTTY;
40
- function color(code, text) {
41
- return useColors ? `${colors[code]}${text}${colors.reset}` : text;
42
- }
43
- export default class OrchestratorReporter {
44
- allowedTestIds = null;
45
- debug = process.env.ORCHESTRATOR_DEBUG === '1';
46
- startTime = 0;
47
- rootDir = '';
48
- testDir = '';
49
- filterJsonPath;
50
- // Counters for summary
51
- passed = 0;
52
- failed = 0;
53
- skipped = 0;
54
- filtered = 0;
55
- constructor(options) {
56
- this.filterJsonPath = options?.filterJson;
57
- }
58
- onBegin(config, suite) {
59
- this.startTime = Date.now();
60
- this.rootDir = config.rootDir;
61
- this.testDir = config.projects[0]?.testDir ?? config.rootDir;
62
- const shardFile = process.env.ORCHESTRATOR_SHARD_FILE;
63
- if (!shardFile || !fs.existsSync(shardFile)) {
64
- // No shard file - let other reporters handle output
65
- if (this.debug) {
66
- console.log(color('gray', '[Orchestrator] No shard file, running all tests'));
67
- }
68
- return;
69
- }
70
- try {
71
- const testIds = JSON.parse(fs.readFileSync(shardFile, 'utf-8'));
72
- this.allowedTestIds = new Set(testIds);
73
- // Count tests
74
- const allTests = suite.allTests();
75
- const shardTestCount = this.allowedTestIds.size;
76
- this.filtered = allTests.length - shardTestCount;
77
- // Print header
78
- const workers = config.workers;
79
- let header = `\nRunning ${color('bold', String(shardTestCount))} tests using ${workers} workers`;
80
- if (this.debug && this.filtered > 0) {
81
- header += color('gray', ` (${this.filtered} filtered by orchestrator)`);
82
- }
83
- console.log(header);
84
- console.log('');
85
- }
86
- catch (error) {
87
- console.error('[Orchestrator] Failed to load shard file:', error);
88
- throw error;
89
- }
90
- }
91
- onTestEnd(test, result) {
92
- const testId = this.buildTestId(test);
93
- const isInShard = !this.allowedTestIds || this.allowedTestIds.has(testId);
94
- if (isInShard) {
95
- // Track stats for shard tests
96
- if (result.status === 'passed') {
97
- this.passed++;
98
- }
99
- else if (result.status === 'failed' || result.status === 'timedOut') {
100
- this.failed++;
101
- }
102
- else if (result.status === 'skipped') {
103
- this.skipped++;
104
- }
105
- // Print test result
106
- this.printTestResult(test, result);
107
- }
108
- else if (this.debug) {
109
- // Show filtered tests only in debug mode
110
- this.printFiltered(test);
111
- }
112
- }
113
- onEnd(_result) {
114
- // Only print summary if we have a shard file
115
- if (!this.allowedTestIds)
116
- return;
117
- const duration = Date.now() - this.startTime;
118
- const durationStr = this.formatDuration(duration);
119
- console.log('');
120
- // Build summary parts
121
- const parts = [];
122
- if (this.passed > 0) {
123
- parts.push(color('green', `${this.passed} passed`));
124
- }
125
- if (this.failed > 0) {
126
- parts.push(color('red', `${this.failed} failed`));
127
- }
128
- if (this.skipped > 0) {
129
- parts.push(color('yellow', `${this.skipped} skipped`));
130
- }
131
- if (parts.length > 0) {
132
- console.log(` ${parts.join(', ')} ${color('gray', `(${durationStr})`)}`);
133
- }
134
- }
135
- /**
136
- * Print a test result line
137
- */
138
- printTestResult(test, result) {
139
- const duration = result.duration;
140
- const durationStr = duration > 0 ? color('gray', ` (${this.formatDuration(duration)})`) : '';
141
- const titlePath = this.getDisplayTitle(test);
142
- let status;
143
- switch (result.status) {
144
- case 'passed':
145
- status = color('green', '✓');
146
- break;
147
- case 'failed':
148
- case 'timedOut':
149
- status = color('red', '✗');
150
- break;
151
- case 'skipped':
152
- status = color('yellow', '-');
153
- break;
154
- default:
155
- status = '?';
156
- }
157
- console.log(` ${status} ${titlePath}${durationStr}`);
158
- // Print error for failed tests
159
- if (result.status === 'failed' || result.status === 'timedOut') {
160
- for (const error of result.errors) {
161
- if (error.message) {
162
- const lines = error.message.split('\n').slice(0, 3);
163
- for (const line of lines) {
164
- console.log(color('red', ` ${line}`));
165
- }
166
- }
167
- }
168
- }
169
- }
170
- /**
171
- * Print a filtered test (debug mode only)
172
- */
173
- printFiltered(test) {
174
- const titlePath = this.getDisplayTitle(test);
175
- console.log(` ${color('gray', '○')} ${color('gray', titlePath)}`);
176
- }
177
- /**
178
- * Get display title for a test (file > describe > test)
179
- */
180
- getDisplayTitle(test) {
181
- const file = path.basename(test.location.file);
182
- const filteredTitles = this.getFilteredTitles(test);
183
- return `${file} > ${filteredTitles.join(' > ')}`;
184
- }
185
- /**
186
- * Filter titlePath to get only describe blocks and test title.
187
- * Uses shared filterRuntimeTitlePath function for consistency.
188
- */
189
- getFilteredTitles(test) {
190
- const titlePath = test.titlePath();
191
- const projectName = test.parent?.project()?.name;
192
- const fileName = path.basename(test.location.file);
193
- return filterRuntimeTitlePath(titlePath, { projectName, fileName });
194
- }
195
- /**
196
- * Format duration in human readable format
197
- */
198
- formatDuration(ms) {
199
- if (ms < 1000) {
200
- return `${ms}ms`;
201
- }
202
- const seconds = ms / 1000;
203
- if (seconds < 60) {
204
- return `${seconds.toFixed(1)}s`;
205
- }
206
- const minutes = Math.floor(seconds / 60);
207
- const remainingSeconds = Math.round(seconds % 60);
208
- return `${minutes}m ${remainingSeconds}s`;
209
- }
210
- async onExit() {
211
- if (!this.filterJsonPath || !this.allowedTestIds)
212
- return;
213
- const reportPath = path.resolve(this.filterJsonPath);
214
- if (!fs.existsSync(reportPath)) {
215
- if (this.debug) {
216
- console.log(color('gray', `[Orchestrator] filterJson file not found: ${reportPath}`));
217
- }
218
- return;
219
- }
220
- try {
221
- const report = JSON.parse(fs.readFileSync(reportPath, 'utf-8'));
222
- if (!report.suites)
223
- return;
224
- const testDir = report.config?.projects?.[0]?.testDir || this.testDir || this.rootDir;
225
- const beforeCount = this.countSpecs(report.suites);
226
- this.filterSuitesById(report.suites, testDir, this.allowedTestIds, [], true);
227
- const afterCount = this.countSpecs(report.suites);
228
- if (report.stats) {
229
- report.stats = this.recalculateStats(report.suites, report.stats);
230
- }
231
- fs.writeFileSync(reportPath, JSON.stringify(report));
232
- if (this.debug) {
233
- console.log(color('gray', `[Orchestrator] Filtered JSON report: ${beforeCount} → ${afterCount} specs (removed ${beforeCount - afterCount})`));
234
- }
235
- }
236
- catch (error) {
237
- console.error('[Orchestrator] Failed to filter JSON report:', error);
238
- }
239
- }
240
- /**
241
- * Filter specs by checking test IDs against the allowedTestIds set.
242
- * Builds test IDs from the JSON report structure (file path + describe chain + spec title),
243
- * matching the same format used by discovery (buildTestId) and runtime (buildTestIdFromRuntime).
244
- *
245
- * This correctly handles ALL non-shard tests, including genuinely skipped tests
246
- * (test.skip, test.fixme, test.describe.skip) that never receive the "Not in shard" annotation
247
- * because the orchestrator fixture doesn't run for them.
248
- */
249
- filterSuitesById(suites, testDir, allowedIds, parentTitles, isRootLevel) {
250
- for (let i = suites.length - 1; i >= 0; i--) {
251
- const suite = suites[i];
252
- if (!suite)
253
- continue;
254
- const suiteTitle = suite.title;
255
- const suiteFile = suite.file;
256
- // Root-level suites are file-level (title = filename) → skip from describe chain
257
- // Nested suites are describe blocks → include title in chain
258
- const currentTitles = isRootLevel ? [] : [...parentTitles, suiteTitle];
259
- const filePath = suiteFile
260
- ? this.resolveReportFilePath(suiteFile, testDir)
261
- : '';
262
- if (Array.isArray(suite.specs)) {
263
- suite.specs = suite.specs.filter((spec) => {
264
- const specTitle = spec.title;
265
- const testId = [filePath, ...currentTitles, specTitle].join('::');
266
- return allowedIds.has(testId);
267
- });
268
- }
269
- if (Array.isArray(suite.suites)) {
270
- this.filterSuitesById(suite.suites, testDir, allowedIds, currentTitles, false);
271
- }
272
- const hasSpecs = Array.isArray(suite.specs) && suite.specs.length > 0;
273
- const hasSubSuites = Array.isArray(suite.suites) && suite.suites.length > 0;
274
- if (!hasSpecs && !hasSubSuites) {
275
- suites.splice(i, 1);
276
- }
277
- }
278
- }
279
- resolveReportFilePath(filePath, testDir) {
280
- if (path.isAbsolute(filePath)) {
281
- return path.relative(testDir, filePath).replace(/\\/g, '/');
282
- }
283
- return filePath.replace(/\\/g, '/');
284
- }
285
- /**
286
- * Recalculate the stats object to match the filtered suites.
287
- * Playwright JSON stats use: expected (passed), skipped, unexpected (failed), flaky.
288
- */
289
- recalculateStats(suites, originalStats) {
290
- const counts = { expected: 0, unexpected: 0, skipped: 0, flaky: 0 };
291
- this.countTestStatuses(suites, counts);
292
- return { ...originalStats, ...counts };
293
- }
294
- countTestStatuses(suites, counts) {
295
- for (const suite of suites) {
296
- if (Array.isArray(suite.specs)) {
297
- for (const spec of suite.specs) {
298
- const tests = spec.tests;
299
- if (!tests)
300
- continue;
301
- for (const test of tests) {
302
- const status = test.status;
303
- if (status in counts && counts[status] !== undefined) {
304
- counts[status] = counts[status] + 1;
305
- }
306
- }
307
- }
308
- }
309
- if (Array.isArray(suite.suites)) {
310
- this.countTestStatuses(suite.suites, counts);
311
- }
312
- }
313
- }
314
- countSpecs(suites) {
315
- let count = 0;
316
- for (const suite of suites) {
317
- if (Array.isArray(suite.specs))
318
- count += suite.specs.length;
319
- if (Array.isArray(suite.suites))
320
- count += this.countSpecs(suite.suites);
321
- }
322
- return count;
323
- }
324
- /**
325
- * Build test ID from TestCase.
326
- * Uses shared buildTestIdFromRuntime function for consistency with fixture.
327
- *
328
- * CRITICAL: Must use project.testDir to match discovery-generated test IDs.
329
- * No fallback to rootDir or process.cwd() - these cause path mismatch bugs.
330
- */
331
- buildTestId(test) {
332
- const testDir = test.parent?.project()?.testDir;
333
- if (!testDir) {
334
- throw new Error('[Orchestrator Reporter] Could not determine project testDir. ' +
335
- 'Ensure your playwright.config.ts has projects configured with testDir.');
336
- }
337
- return buildTestIdFromRuntime(test.location.file, test.titlePath(), {
338
- projectName: test.parent?.project()?.name,
339
- baseDir: testDir,
340
- });
341
- }
342
- }
343
- //# sourceMappingURL=reporter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reporter.js","sourceRoot":"","sources":["../src/reporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AASlC,OAAO,EACL,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,mBAAmB,CAAC;AAE3B,mBAAmB;AACnB,MAAM,MAAM,GAAG;IACb,KAAK,EAAE,UAAU;IACjB,GAAG,EAAE,UAAU;IACf,MAAM,EAAE,UAAU;IAClB,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,SAAS;IAChB,IAAI,EAAE,SAAS;CAChB,CAAC;AAEF,iCAAiC;AACjC,MAAM,SAAS,GACb,OAAO,CAAC,GAAG,CAAC,WAAW,KAAK,GAAG;IAC/B,OAAO,CAAC,GAAG,CAAC,QAAQ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