1 | import child from 'node:child_process';
|
2 | import { EventEmitter } from 'node:events';
|
3 | import type { ChildProcess } from 'node:child_process';
|
4 | import type { WritableStreamBuffer } from 'stream-buffers';
|
5 | import type { Options, Workers } from '@wdio/types';
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 | export default class WorkerInstance extends EventEmitter implements Workers.Worker {
|
12 | cid: string;
|
13 | config: Options.Testrunner;
|
14 | configFile: string;
|
15 | caps: WebdriverIO.Capabilities;
|
16 | capabilities: WebdriverIO.Capabilities;
|
17 | specs: string[];
|
18 | execArgv: string[];
|
19 | retries: number;
|
20 | stdout: WritableStreamBuffer;
|
21 | stderr: WritableStreamBuffer;
|
22 | childProcess?: ChildProcess;
|
23 | sessionId?: string;
|
24 | server?: Record<string, any>;
|
25 | logsAggregator: string[];
|
26 | instances?: Record<string, {
|
27 | sessionId: string;
|
28 | }>;
|
29 | isMultiremote?: boolean;
|
30 | isBusy: boolean;
|
31 | isKilled: boolean;
|
32 | isReady: Promise<boolean>;
|
33 | isSetup: Promise<boolean>;
|
34 | isReadyResolver: (value: boolean | PromiseLike<boolean>) => void;
|
35 | isSetupResolver: (value: boolean | PromiseLike<boolean>) => void;
|
36 | |
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 | constructor(config: Options.Testrunner, { cid, configFile, caps, specs, execArgv, retries }: Workers.WorkerRunPayload, stdout: WritableStreamBuffer, stderr: WritableStreamBuffer);
|
47 | /**
|
48 | * spawns process to kick of wdio-runner
|
49 | */
|
50 | startProcess(): child.ChildProcess;
|
51 | private _handleMessage;
|
52 | private _handleError;
|
53 | private _handleExit;
|
54 | /**
|
55 | * sends message to sub process to execute functions in wdio-runner
|
56 | * @param command method to run in wdio-runner
|
57 | * @param args arguments for functions to call
|
58 | */
|
59 | postMessage(command: string, args: Workers.WorkerMessageArgs, requiresSetup?: boolean): void;
|
60 | }
|
61 | //# sourceMappingURL=worker.d.ts.map |
\ | No newline at end of file |