@testrelic/maestro-analytics 1.2.0-next.54 → 1.2.1-next.56
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/cli.cjs +6 -4
- package/dist/index.cjs +17 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +90 -73
- package/dist/index.d.ts +90 -73
- package/dist/index.js +17 -17
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TestStatus, CloudReporterOptions, ReportMode, CloudConfig, ApiCallRecord, TimelineEntry, Summary, TestRunReport,
|
|
1
|
+
import { TestStatus, CloudReporterOptions, ReportMode, CloudConfig, ApiCallRecord, TimelineEntry, Summary, TestRunReport, TimelineStep, ActionStep, GitMetadata, CIMetadata, AuthMode } from '@testrelic/core';
|
|
2
2
|
export { ActionCategory, ActionStep, ArtifactRunManifest, AuthMode, AuthState, CIMetadata, CIProvider, CloudConfig, CloudReporterOptions, ConsoleLogEntry, ConsoleLogLevel, FailureDiagnostic, GitMetadata, MergeOptions, QueueEntry, ReportMode, StreamingReportSummary, Summary, TestArtifacts, TestDetailData, TestIndexEntry, TestResult, TestRunReport, TestStatus, TimelineEntry, TimelineStep, UploadStrategy } from '@testrelic/core';
|
|
3
3
|
export { mergeReports, mergeReportsFromDirectory } from './merge.cjs';
|
|
4
4
|
|
|
@@ -414,78 +414,6 @@ interface RunMaestroExtras {
|
|
|
414
414
|
}
|
|
415
415
|
declare function runMaestro(options: MaestroTestOptions, extras?: RunMaestroExtras): Promise<MaestroRunResult>;
|
|
416
416
|
|
|
417
|
-
/**
|
|
418
|
-
* Report orchestrator — ties all parsers together to produce
|
|
419
|
-
* a TestRunReport from Maestro's output artifacts.
|
|
420
|
-
*/
|
|
421
|
-
|
|
422
|
-
interface OrchestratorInput {
|
|
423
|
-
readonly junitPath?: string;
|
|
424
|
-
readonly testOutputDir?: string;
|
|
425
|
-
readonly debugOutputDir?: string;
|
|
426
|
-
readonly flowsDir?: string;
|
|
427
|
-
readonly config: ResolvedMaestroConfig;
|
|
428
|
-
/** Device serial / name used during this run, e.g. "emulator-5554". Passed through to each flow result and uploaded as deviceName. */
|
|
429
|
-
readonly device?: string;
|
|
430
|
-
/**
|
|
431
|
-
* Explicit mobile platform override ('android' | 'ios').
|
|
432
|
-
* When set, this takes precedence over log-based detection so callers that
|
|
433
|
-
* already know the target platform (e.g. the E2E script using adb) do not
|
|
434
|
-
* rely on heuristic detection that may return 'unknown'.
|
|
435
|
-
*/
|
|
436
|
-
readonly platform?: MaestroPlatform;
|
|
437
|
-
/**
|
|
438
|
-
* Directory containing JSONL files emitted by `network-proxy.ts` (mitmproxy
|
|
439
|
-
* addon). When omitted, the orchestrator still picks up `config.network.harPath`
|
|
440
|
-
* if set. Unrelated to Maestro's own debug output.
|
|
441
|
-
*/
|
|
442
|
-
readonly networkJsonlDir?: string | null;
|
|
443
|
-
}
|
|
444
|
-
interface OrchestratorResult {
|
|
445
|
-
readonly report: TestRunReport;
|
|
446
|
-
readonly flowResults: MaestroFlowResult[];
|
|
447
|
-
readonly aiDefects: AIDefect[];
|
|
448
|
-
readonly artifacts: CollectedArtifacts;
|
|
449
|
-
}
|
|
450
|
-
declare function orchestrateReport(input: OrchestratorInput): Promise<OrchestratorResult>;
|
|
451
|
-
|
|
452
|
-
/**
|
|
453
|
-
* CloudClient — manages cloud connectivity lifecycle for Maestro analytics.
|
|
454
|
-
* Handles auth, repo resolution, token refresh, and queue flush.
|
|
455
|
-
*/
|
|
456
|
-
|
|
457
|
-
declare class CloudClient {
|
|
458
|
-
private config;
|
|
459
|
-
private authState;
|
|
460
|
-
private gitMetadata;
|
|
461
|
-
private repoId;
|
|
462
|
-
private failureReason;
|
|
463
|
-
private flushPromise;
|
|
464
|
-
private healthCheckTimer;
|
|
465
|
-
constructor(cloudConfig: CloudConfig | null);
|
|
466
|
-
initialize(): Promise<void>;
|
|
467
|
-
getMode(): AuthMode;
|
|
468
|
-
isCloudMode(): boolean;
|
|
469
|
-
isLocalMode(): boolean;
|
|
470
|
-
getAccessToken(): string | null;
|
|
471
|
-
getRepoId(): string | null;
|
|
472
|
-
getGitMetadata(): GitMetadata | null;
|
|
473
|
-
getConfig(): CloudConfig | null;
|
|
474
|
-
getFailureReason(): string | null;
|
|
475
|
-
getEndpoint(): string;
|
|
476
|
-
ensureValidToken(): Promise<boolean>;
|
|
477
|
-
switchToLocalMode(reason: string): void;
|
|
478
|
-
dispose(): Promise<void>;
|
|
479
|
-
private setLocalMode;
|
|
480
|
-
private handleAuthError;
|
|
481
|
-
private resolveRepoId;
|
|
482
|
-
private readRepoCache;
|
|
483
|
-
private writeRepoCache;
|
|
484
|
-
private hashApiKey;
|
|
485
|
-
private startBackgroundFlush;
|
|
486
|
-
private startHealthCheck;
|
|
487
|
-
}
|
|
488
|
-
|
|
489
417
|
/**
|
|
490
418
|
* Cloud upload — batch and realtime upload functions.
|
|
491
419
|
* Adapted from appium-analytics with testFramework: 'maestro'.
|
|
@@ -531,6 +459,23 @@ interface TestResultForUpload {
|
|
|
531
459
|
* via Ask AI's `query_network_logs` tool — works for free, no cloud changes.
|
|
532
460
|
*/
|
|
533
461
|
readonly apiCalls?: readonly ApiCallRecord[];
|
|
462
|
+
/**
|
|
463
|
+
* Per-flow ActionStep array (mapped from Maestro `commands` + `assertions`,
|
|
464
|
+
* sorted by timestamp + sequenceNumber, with `retry`/`repeat` children
|
|
465
|
+
* nested under their wrapper and `videoOffset` computed from
|
|
466
|
+
* `flow.startedAt`). The cloud server's per-test ingest path
|
|
467
|
+
* (`server/src/services/run.service.ts:uploadTest` → `enrichTimeline` →
|
|
468
|
+
* OpenObserve `timeline_{orgId}` + RustFS `actions.json`) consumes this
|
|
469
|
+
* and powers the Session Workspace's Steps + Assertions tabs and Ask AI's
|
|
470
|
+
* `query_test_steps` tool.
|
|
471
|
+
*
|
|
472
|
+
* The same array also rides on `timeline[i].tests[j].actions` in the
|
|
473
|
+
* upload's `timeline` field — but the cloud's per-test ingest path keys off
|
|
474
|
+
* `tests[].actions`. Without this field, Maestro test detail pages show
|
|
475
|
+
* "No step data available" even though the run summary reports correct step
|
|
476
|
+
* counts. See issue #77.
|
|
477
|
+
*/
|
|
478
|
+
readonly actions?: readonly ActionStep[];
|
|
534
479
|
}
|
|
535
480
|
interface RunUploadPayload {
|
|
536
481
|
readonly runId: string;
|
|
@@ -589,6 +534,78 @@ declare function finalizeRun(endpoint: string, accessToken: string, cloudRunId:
|
|
|
589
534
|
commitMessage?: string | null;
|
|
590
535
|
}): Promise<boolean>;
|
|
591
536
|
|
|
537
|
+
/**
|
|
538
|
+
* Report orchestrator — ties all parsers together to produce
|
|
539
|
+
* a TestRunReport from Maestro's output artifacts.
|
|
540
|
+
*/
|
|
541
|
+
|
|
542
|
+
interface OrchestratorInput {
|
|
543
|
+
readonly junitPath?: string;
|
|
544
|
+
readonly testOutputDir?: string;
|
|
545
|
+
readonly debugOutputDir?: string;
|
|
546
|
+
readonly flowsDir?: string;
|
|
547
|
+
readonly config: ResolvedMaestroConfig;
|
|
548
|
+
/** Device serial / name used during this run, e.g. "emulator-5554". Passed through to each flow result and uploaded as deviceName. */
|
|
549
|
+
readonly device?: string;
|
|
550
|
+
/**
|
|
551
|
+
* Explicit mobile platform override ('android' | 'ios').
|
|
552
|
+
* When set, this takes precedence over log-based detection so callers that
|
|
553
|
+
* already know the target platform (e.g. the E2E script using adb) do not
|
|
554
|
+
* rely on heuristic detection that may return 'unknown'.
|
|
555
|
+
*/
|
|
556
|
+
readonly platform?: MaestroPlatform;
|
|
557
|
+
/**
|
|
558
|
+
* Directory containing JSONL files emitted by `network-proxy.ts` (mitmproxy
|
|
559
|
+
* addon). When omitted, the orchestrator still picks up `config.network.harPath`
|
|
560
|
+
* if set. Unrelated to Maestro's own debug output.
|
|
561
|
+
*/
|
|
562
|
+
readonly networkJsonlDir?: string | null;
|
|
563
|
+
}
|
|
564
|
+
interface OrchestratorResult {
|
|
565
|
+
readonly report: TestRunReport;
|
|
566
|
+
readonly flowResults: MaestroFlowResult[];
|
|
567
|
+
readonly aiDefects: AIDefect[];
|
|
568
|
+
readonly artifacts: CollectedArtifacts;
|
|
569
|
+
}
|
|
570
|
+
declare function orchestrateReport(input: OrchestratorInput): Promise<OrchestratorResult>;
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* CloudClient — manages cloud connectivity lifecycle for Maestro analytics.
|
|
574
|
+
* Handles auth, repo resolution, token refresh, and queue flush.
|
|
575
|
+
*/
|
|
576
|
+
|
|
577
|
+
declare class CloudClient {
|
|
578
|
+
private config;
|
|
579
|
+
private authState;
|
|
580
|
+
private gitMetadata;
|
|
581
|
+
private repoId;
|
|
582
|
+
private failureReason;
|
|
583
|
+
private flushPromise;
|
|
584
|
+
private healthCheckTimer;
|
|
585
|
+
constructor(cloudConfig: CloudConfig | null);
|
|
586
|
+
initialize(): Promise<void>;
|
|
587
|
+
getMode(): AuthMode;
|
|
588
|
+
isCloudMode(): boolean;
|
|
589
|
+
isLocalMode(): boolean;
|
|
590
|
+
getAccessToken(): string | null;
|
|
591
|
+
getRepoId(): string | null;
|
|
592
|
+
getGitMetadata(): GitMetadata | null;
|
|
593
|
+
getConfig(): CloudConfig | null;
|
|
594
|
+
getFailureReason(): string | null;
|
|
595
|
+
getEndpoint(): string;
|
|
596
|
+
ensureValidToken(): Promise<boolean>;
|
|
597
|
+
switchToLocalMode(reason: string): void;
|
|
598
|
+
dispose(): Promise<void>;
|
|
599
|
+
private setLocalMode;
|
|
600
|
+
private handleAuthError;
|
|
601
|
+
private resolveRepoId;
|
|
602
|
+
private readRepoCache;
|
|
603
|
+
private writeRepoCache;
|
|
604
|
+
private hashApiKey;
|
|
605
|
+
private startBackgroundFlush;
|
|
606
|
+
private startHealthCheck;
|
|
607
|
+
}
|
|
608
|
+
|
|
592
609
|
/**
|
|
593
610
|
* Cloud reporter orchestration for Maestro analytics.
|
|
594
611
|
* Handles batch upload and artifact upload to the TestRelic platform.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TestStatus, CloudReporterOptions, ReportMode, CloudConfig, ApiCallRecord, TimelineEntry, Summary, TestRunReport,
|
|
1
|
+
import { TestStatus, CloudReporterOptions, ReportMode, CloudConfig, ApiCallRecord, TimelineEntry, Summary, TestRunReport, TimelineStep, ActionStep, GitMetadata, CIMetadata, AuthMode } from '@testrelic/core';
|
|
2
2
|
export { ActionCategory, ActionStep, ArtifactRunManifest, AuthMode, AuthState, CIMetadata, CIProvider, CloudConfig, CloudReporterOptions, ConsoleLogEntry, ConsoleLogLevel, FailureDiagnostic, GitMetadata, MergeOptions, QueueEntry, ReportMode, StreamingReportSummary, Summary, TestArtifacts, TestDetailData, TestIndexEntry, TestResult, TestRunReport, TestStatus, TimelineEntry, TimelineStep, UploadStrategy } from '@testrelic/core';
|
|
3
3
|
export { mergeReports, mergeReportsFromDirectory } from './merge.js';
|
|
4
4
|
|
|
@@ -414,78 +414,6 @@ interface RunMaestroExtras {
|
|
|
414
414
|
}
|
|
415
415
|
declare function runMaestro(options: MaestroTestOptions, extras?: RunMaestroExtras): Promise<MaestroRunResult>;
|
|
416
416
|
|
|
417
|
-
/**
|
|
418
|
-
* Report orchestrator — ties all parsers together to produce
|
|
419
|
-
* a TestRunReport from Maestro's output artifacts.
|
|
420
|
-
*/
|
|
421
|
-
|
|
422
|
-
interface OrchestratorInput {
|
|
423
|
-
readonly junitPath?: string;
|
|
424
|
-
readonly testOutputDir?: string;
|
|
425
|
-
readonly debugOutputDir?: string;
|
|
426
|
-
readonly flowsDir?: string;
|
|
427
|
-
readonly config: ResolvedMaestroConfig;
|
|
428
|
-
/** Device serial / name used during this run, e.g. "emulator-5554". Passed through to each flow result and uploaded as deviceName. */
|
|
429
|
-
readonly device?: string;
|
|
430
|
-
/**
|
|
431
|
-
* Explicit mobile platform override ('android' | 'ios').
|
|
432
|
-
* When set, this takes precedence over log-based detection so callers that
|
|
433
|
-
* already know the target platform (e.g. the E2E script using adb) do not
|
|
434
|
-
* rely on heuristic detection that may return 'unknown'.
|
|
435
|
-
*/
|
|
436
|
-
readonly platform?: MaestroPlatform;
|
|
437
|
-
/**
|
|
438
|
-
* Directory containing JSONL files emitted by `network-proxy.ts` (mitmproxy
|
|
439
|
-
* addon). When omitted, the orchestrator still picks up `config.network.harPath`
|
|
440
|
-
* if set. Unrelated to Maestro's own debug output.
|
|
441
|
-
*/
|
|
442
|
-
readonly networkJsonlDir?: string | null;
|
|
443
|
-
}
|
|
444
|
-
interface OrchestratorResult {
|
|
445
|
-
readonly report: TestRunReport;
|
|
446
|
-
readonly flowResults: MaestroFlowResult[];
|
|
447
|
-
readonly aiDefects: AIDefect[];
|
|
448
|
-
readonly artifacts: CollectedArtifacts;
|
|
449
|
-
}
|
|
450
|
-
declare function orchestrateReport(input: OrchestratorInput): Promise<OrchestratorResult>;
|
|
451
|
-
|
|
452
|
-
/**
|
|
453
|
-
* CloudClient — manages cloud connectivity lifecycle for Maestro analytics.
|
|
454
|
-
* Handles auth, repo resolution, token refresh, and queue flush.
|
|
455
|
-
*/
|
|
456
|
-
|
|
457
|
-
declare class CloudClient {
|
|
458
|
-
private config;
|
|
459
|
-
private authState;
|
|
460
|
-
private gitMetadata;
|
|
461
|
-
private repoId;
|
|
462
|
-
private failureReason;
|
|
463
|
-
private flushPromise;
|
|
464
|
-
private healthCheckTimer;
|
|
465
|
-
constructor(cloudConfig: CloudConfig | null);
|
|
466
|
-
initialize(): Promise<void>;
|
|
467
|
-
getMode(): AuthMode;
|
|
468
|
-
isCloudMode(): boolean;
|
|
469
|
-
isLocalMode(): boolean;
|
|
470
|
-
getAccessToken(): string | null;
|
|
471
|
-
getRepoId(): string | null;
|
|
472
|
-
getGitMetadata(): GitMetadata | null;
|
|
473
|
-
getConfig(): CloudConfig | null;
|
|
474
|
-
getFailureReason(): string | null;
|
|
475
|
-
getEndpoint(): string;
|
|
476
|
-
ensureValidToken(): Promise<boolean>;
|
|
477
|
-
switchToLocalMode(reason: string): void;
|
|
478
|
-
dispose(): Promise<void>;
|
|
479
|
-
private setLocalMode;
|
|
480
|
-
private handleAuthError;
|
|
481
|
-
private resolveRepoId;
|
|
482
|
-
private readRepoCache;
|
|
483
|
-
private writeRepoCache;
|
|
484
|
-
private hashApiKey;
|
|
485
|
-
private startBackgroundFlush;
|
|
486
|
-
private startHealthCheck;
|
|
487
|
-
}
|
|
488
|
-
|
|
489
417
|
/**
|
|
490
418
|
* Cloud upload — batch and realtime upload functions.
|
|
491
419
|
* Adapted from appium-analytics with testFramework: 'maestro'.
|
|
@@ -531,6 +459,23 @@ interface TestResultForUpload {
|
|
|
531
459
|
* via Ask AI's `query_network_logs` tool — works for free, no cloud changes.
|
|
532
460
|
*/
|
|
533
461
|
readonly apiCalls?: readonly ApiCallRecord[];
|
|
462
|
+
/**
|
|
463
|
+
* Per-flow ActionStep array (mapped from Maestro `commands` + `assertions`,
|
|
464
|
+
* sorted by timestamp + sequenceNumber, with `retry`/`repeat` children
|
|
465
|
+
* nested under their wrapper and `videoOffset` computed from
|
|
466
|
+
* `flow.startedAt`). The cloud server's per-test ingest path
|
|
467
|
+
* (`server/src/services/run.service.ts:uploadTest` → `enrichTimeline` →
|
|
468
|
+
* OpenObserve `timeline_{orgId}` + RustFS `actions.json`) consumes this
|
|
469
|
+
* and powers the Session Workspace's Steps + Assertions tabs and Ask AI's
|
|
470
|
+
* `query_test_steps` tool.
|
|
471
|
+
*
|
|
472
|
+
* The same array also rides on `timeline[i].tests[j].actions` in the
|
|
473
|
+
* upload's `timeline` field — but the cloud's per-test ingest path keys off
|
|
474
|
+
* `tests[].actions`. Without this field, Maestro test detail pages show
|
|
475
|
+
* "No step data available" even though the run summary reports correct step
|
|
476
|
+
* counts. See issue #77.
|
|
477
|
+
*/
|
|
478
|
+
readonly actions?: readonly ActionStep[];
|
|
534
479
|
}
|
|
535
480
|
interface RunUploadPayload {
|
|
536
481
|
readonly runId: string;
|
|
@@ -589,6 +534,78 @@ declare function finalizeRun(endpoint: string, accessToken: string, cloudRunId:
|
|
|
589
534
|
commitMessage?: string | null;
|
|
590
535
|
}): Promise<boolean>;
|
|
591
536
|
|
|
537
|
+
/**
|
|
538
|
+
* Report orchestrator — ties all parsers together to produce
|
|
539
|
+
* a TestRunReport from Maestro's output artifacts.
|
|
540
|
+
*/
|
|
541
|
+
|
|
542
|
+
interface OrchestratorInput {
|
|
543
|
+
readonly junitPath?: string;
|
|
544
|
+
readonly testOutputDir?: string;
|
|
545
|
+
readonly debugOutputDir?: string;
|
|
546
|
+
readonly flowsDir?: string;
|
|
547
|
+
readonly config: ResolvedMaestroConfig;
|
|
548
|
+
/** Device serial / name used during this run, e.g. "emulator-5554". Passed through to each flow result and uploaded as deviceName. */
|
|
549
|
+
readonly device?: string;
|
|
550
|
+
/**
|
|
551
|
+
* Explicit mobile platform override ('android' | 'ios').
|
|
552
|
+
* When set, this takes precedence over log-based detection so callers that
|
|
553
|
+
* already know the target platform (e.g. the E2E script using adb) do not
|
|
554
|
+
* rely on heuristic detection that may return 'unknown'.
|
|
555
|
+
*/
|
|
556
|
+
readonly platform?: MaestroPlatform;
|
|
557
|
+
/**
|
|
558
|
+
* Directory containing JSONL files emitted by `network-proxy.ts` (mitmproxy
|
|
559
|
+
* addon). When omitted, the orchestrator still picks up `config.network.harPath`
|
|
560
|
+
* if set. Unrelated to Maestro's own debug output.
|
|
561
|
+
*/
|
|
562
|
+
readonly networkJsonlDir?: string | null;
|
|
563
|
+
}
|
|
564
|
+
interface OrchestratorResult {
|
|
565
|
+
readonly report: TestRunReport;
|
|
566
|
+
readonly flowResults: MaestroFlowResult[];
|
|
567
|
+
readonly aiDefects: AIDefect[];
|
|
568
|
+
readonly artifacts: CollectedArtifacts;
|
|
569
|
+
}
|
|
570
|
+
declare function orchestrateReport(input: OrchestratorInput): Promise<OrchestratorResult>;
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* CloudClient — manages cloud connectivity lifecycle for Maestro analytics.
|
|
574
|
+
* Handles auth, repo resolution, token refresh, and queue flush.
|
|
575
|
+
*/
|
|
576
|
+
|
|
577
|
+
declare class CloudClient {
|
|
578
|
+
private config;
|
|
579
|
+
private authState;
|
|
580
|
+
private gitMetadata;
|
|
581
|
+
private repoId;
|
|
582
|
+
private failureReason;
|
|
583
|
+
private flushPromise;
|
|
584
|
+
private healthCheckTimer;
|
|
585
|
+
constructor(cloudConfig: CloudConfig | null);
|
|
586
|
+
initialize(): Promise<void>;
|
|
587
|
+
getMode(): AuthMode;
|
|
588
|
+
isCloudMode(): boolean;
|
|
589
|
+
isLocalMode(): boolean;
|
|
590
|
+
getAccessToken(): string | null;
|
|
591
|
+
getRepoId(): string | null;
|
|
592
|
+
getGitMetadata(): GitMetadata | null;
|
|
593
|
+
getConfig(): CloudConfig | null;
|
|
594
|
+
getFailureReason(): string | null;
|
|
595
|
+
getEndpoint(): string;
|
|
596
|
+
ensureValidToken(): Promise<boolean>;
|
|
597
|
+
switchToLocalMode(reason: string): void;
|
|
598
|
+
dispose(): Promise<void>;
|
|
599
|
+
private setLocalMode;
|
|
600
|
+
private handleAuthError;
|
|
601
|
+
private resolveRepoId;
|
|
602
|
+
private readRepoCache;
|
|
603
|
+
private writeRepoCache;
|
|
604
|
+
private hashApiKey;
|
|
605
|
+
private startBackgroundFlush;
|
|
606
|
+
private startHealthCheck;
|
|
607
|
+
}
|
|
608
|
+
|
|
592
609
|
/**
|
|
593
610
|
* Cloud reporter orchestration for Maestro analytics.
|
|
594
611
|
* Handles batch upload and artifact upload to the TestRelic platform.
|