@wdio/local-runner

  • Version 9.19.1
  • Published
  • 30.9 kB
  • 10 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: WebdriverIO.Config);

      property config

      protected config: WebdriverIO.Config;

        property stderr

        stderr: WritableStreamBuffer;

          property stdout

          stdout: WritableStreamBuffer;

            property workerPool

            workerPool: Record<string, WorkerInstance>;

              method getWorkerCount

              getWorkerCount: () => number;

                method initialize

                initialize: () => Promise<void>;
                • initialize local runner environment

                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: WebdriverIO.Config,
                  {
                  cid,
                  configFile,
                  caps,
                  specs,
                  execArgv,
                  retries,
                  }: Workers.WorkerRunPayload,
                  stdout: WritableStreamBuffer,
                  stderr: WritableStreamBuffer,
                  xvfbManager: XvfbManager
                  );
                  • 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

                    Parameter xvfbManager

                    configured XvfbManager instance

                  property capabilities

                  capabilities: WebdriverIO.Capabilities;

                    property caps

                    caps: WebdriverIO.Capabilities;

                      property childProcess

                      childProcess?: ChildProcess;

                        property cid

                        cid: string;

                          property config

                          config: WebdriverIO.Config;

                            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, string>;

                                                      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
                                                              ) => Promise<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: () => Promise<ChildProcess>;
                                                              • spawns process to kick of wdio-runner

                                                              Interfaces

                                                              interface RunArgs

                                                              interface RunArgs extends Workers.WorkerRunPayload {}

                                                                property args

                                                                args: Workers.WorkerMessageArgs;

                                                                  property command

                                                                  command: string;

                                                                    Package Files (2)

                                                                    Dependencies (10)

                                                                    Dev Dependencies (1)

                                                                    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>