• Version 8.35.1
  • Published
  • 33.6 kB
  • 8 dependencies
  • MIT license


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


A WebdriverIO runner to run tests locally



class LocalRunner

class LocalRunner {}


    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.


                config: Options.Testrunner,
                }: 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: Capabilities.RemoteCapability;

                  property caps

                  caps: Capabilities.RemoteCapability;

                    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


                                                            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.


                                                                  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
                                                                  • 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>