@wdio/local-runner

  • Version 9.4.1
  • Published
  • 29 kB
  • 8 dependencies
  • MIT license

Install

npm i @wdio/local-runner
yarn add @wdio/local-runner
pnpm add @wdio/local-runner

Overview

A WebdriverIO runner to run tests locally

Index

Classes

class LocalRunner

class LocalRunner {}

    constructor

    constructor(_options: never, _config: Options.Testrunner);

      property stderr

      stderr: WritableStreamBuffer;

        property stdout

        stdout: WritableStreamBuffer;

          property workerPool

          workerPool: Record<string, WorkerInstance>;

            method getWorkerCount

            getWorkerCount: () => number;

              method initialize

              initialize: () => void;
              • nothing to initialize when running locally

              method run

              run: ({ command, args, ...workerOptions }: RunArgs) => Promise<WorkerInstance>;

                method shutdown

                shutdown: () => Promise<boolean>;
                • shutdown all worker processes

                  {Promise} resolves when all worker have been shutdown or a timeout was reached

                class WorkerInstance

                class WorkerInstance extends EventEmitter implements Workers.Worker {}
                • WorkerInstance responsible for spawning a sub process to run the framework in and handle its session lifetime.

                constructor

                constructor(
                config: Options.Testrunner,
                {
                cid,
                configFile,
                caps,
                specs,
                execArgv,
                retries,
                }: Workers.WorkerRunPayload,
                stdout: WritableStreamBuffer,
                stderr: WritableStreamBuffer
                );
                • assigns paramters to scope of instance

                  Parameter config

                  parsed configuration object

                  Parameter cid

                  capability id (e.g. 0-1)

                  Parameter configFile

                  path to config file (for sub process to parse)

                  Parameter caps

                  capability object

                  Parameter specs

                  list of paths to test files to run in this worker

                  Parameter retries

                  number of retries remaining

                  Parameter execArgv

                  execution arguments for the test run

                property capabilities

                capabilities: WebdriverIO.Capabilities;

                  property caps

                  caps: WebdriverIO.Capabilities;

                    property childProcess

                    childProcess?: ChildProcess;

                      property cid

                      cid: string;

                        property config

                        config: Options.Testrunner;

                          property configFile

                          configFile: string;

                            property execArgv

                            execArgv: string[];

                              property instances

                              instances?: Record<string, { sessionId: string }>;

                                property isBusy

                                isBusy: boolean;

                                  property isKilled

                                  isKilled: boolean;

                                    property isMultiremote

                                    isMultiremote?: boolean;

                                      property isReady

                                      isReady: Promise<boolean>;

                                        property isReadyResolver

                                        isReadyResolver: (value: boolean | PromiseLike<boolean>) => void;

                                          property isSetup

                                          isSetup: Promise<boolean>;

                                            property isSetupResolver

                                            isSetupResolver: (value: boolean | PromiseLike<boolean>) => void;

                                              property logsAggregator

                                              logsAggregator: string[];

                                                property retries

                                                retries: number;

                                                  property server

                                                  server?: Record<string, any>;

                                                    property sessionId

                                                    sessionId?: string;

                                                      property specs

                                                      specs: string[];

                                                        property stderr

                                                        stderr: WritableStreamBuffer;

                                                          property stdout

                                                          stdout: WritableStreamBuffer;

                                                            method postMessage

                                                            postMessage: (
                                                            command: string,
                                                            args: Workers.WorkerMessageArgs,
                                                            requiresSetup?: boolean
                                                            ) => void;
                                                            • sends message to sub process to execute functions in wdio-runner

                                                              Parameter command

                                                              method to run in wdio-runner

                                                              Parameter args

                                                              arguments for functions to call

                                                            method startProcess

                                                            startProcess: () => child.ChildProcess;
                                                            • spawns process to kick of wdio-runner

                                                            Interfaces

                                                            interface RunArgs

                                                            interface RunArgs extends Workers.WorkerRunPayload {}

                                                              property args

                                                              args: any;

                                                                property command

                                                                command: string;

                                                                  Package Files (2)

                                                                  Dependencies (8)

                                                                  Dev Dependencies (2)

                                                                  Peer Dependencies (0)

                                                                  No peer dependencies.

                                                                  Badge

                                                                  To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                  You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@wdio/local-runner.

                                                                  • Markdown
                                                                    [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@wdio/local-runner)
                                                                  • HTML
                                                                    <a href="https://www.jsdocs.io/package/@wdio/local-runner"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>