Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IWorkfloConfig

Type definitions of the config used by wdio-workflo in the file workflo.conf.ts.

Hierarchy

Index

Properties

Optional agent

agent: Object

http(s).Agent instance to use

default

new http(s).Agent({ keepAlive: true })

Optional allure

allure: object

Options for allure report.

Type declaration

  • Optional bugAppendix?: string

    Will be appended to bug keys displayed in allure report. This can be useful as allure report provides no way to distinct issues and bugs by default.

  • Optional bugPrefix?: string

    Will be prepended to bug keys displayed in allure report. This can be useful as allure report provides no way to distinct issues and bugs by default.

  • Optional issueAppendix?: string

    Will be appended to issue keys displayed in allure report. This can be useful as allure report provides no way to distinct issues and bugs by default.

  • Optional issuePrefix?: string

    Will be prepended to issue keys displayed in allure report. This can be useful as allure report provides no way to distinct issues and bugs by default.

  • Optional issueTrackerPattern?: string

    Pattern used to create urls for issues and bugs.

    '%s' in pattern will be replaced with issue/bug keys defined in Story options.

    example

    "http://example.com/jira/browse/%s"

  • Optional testManagementPattern?: string

    Pattern used to create urls for testcase management system.

    '%s' in pattern will be replaced with testId keys defined in Story options.

    example

    "http://example.com/tms/browse/%s"

Optional automaticOnly

automaticOnly: boolean

Run only automatic testcases and do not consider manual results.

default

{default: false}

Optional bail

bail: number

Skip future testcases after a specific amount of already executed testcases have failed. By default, does not bail.

default

0

baseUrl

baseUrl: string

Set a base URL in order to shorten url command calls. If your url parameter starts with /, the base url gets prepended, not including the path portion of your baseUrl. If your url parameter starts without a scheme or / (like some/path), the base url gets prepended directly.

capabilities

capabilities: ICapabilities

Defines the capabilities you want to run in your Selenium session. See https://github.com/SeleniumHQ/selenium/wiki/DesiredCapabilities for a list of the available capabilities.

Please be aware that wdio-workflo's reporting only supports one single instance at a time. Therefore, the "maxInstance" property will always be set to 1.

Optional cleanStackTraces

cleanStackTraces: boolean

Remove error stack trace lines that originate from the test framework itself.

default

{default: true}

Optional connectionRetryCount

connectionRetryCount: number

Count of request retries to the Selenium server.

default

3

Optional connectionRetryTimeout

connectionRetryTimeout: number

Timeout for any request to the Selenium server in milliseconds.

default

90000

Optional consoleLogLevel

consoleLogLevel: "results" | "testcases" | "steps"

Log level output in spec reporter console.

default

testcases

Optional dates

dates: string[]

Restricts testcases and specs (oldest spec criteria) by given date and time (YYYY-MM-DD or YYYY-MM-DDTHH:mm:ss).

example

["(2017-03-10,2017-10-28)"] => restricts by status set between 2017-03-10 and 2017-10-28 (at 0 pm, 0 min, 0 sec) ["2017-07-21", "2017-07-22T14:51:13"] => restricts by last status set on 2017-07-21 or 2017-07-22 at 2 pm, 51 min, 13 sec

Optional debug

debug: boolean

If set to true, Node debugging via the chrome extension "Node-Inspector Manager" is enabled. The test process will then automatically connect to chrome's dedicated dev tools and break on "debugger" statements.

In order for this to work properly, a chrome browser must be installed on the system and the chrome extension "Node-Inspector Manager" needs to be installed.

Sometimes tests might hang after running with debug enabled. In this case, close all chrome processes, open a new chrome window, turn "Node-Inspector Menu" from "Auto" to "Manual" and again to "Auto" and then restarting the tests should resolve the problem.

The following settings are recommended for the "Node-Inspector Manager" extension:

(Main Menu)

  • Host: localhost
  • Port: 9229
  • Open DevTools: "Auto"

(Settings Menu)

  • Open in new Window: On
  • Switch to inspector-window: On
  • Close automatically: On
  • Choose DevTools Version: On (default version)
default

false

Optional debugSeleniumCommand

debugSeleniumCommand: boolean

Outputs selenium commands in the allure report if set to true.

ACTIVATE THIS AT YOUR OWN RISK: Sometimes there is so much output that the maximum call stack size is exceeded.

default

false

Optional execArgv

execArgv: string[]

Execution arguments for the node process. If using the debug option, execArgv will always be overwritten with the value ['--inspect']

Optional features

features: string[]

Restricts test execution to these features.

example

["Login", "Logout"] => execute all testcases which validate specs defined within these features ["-Login"] => execute all testcases except those which validate specs defined within these features

Optional headers

headers: Object

A key-value store of headers to be added to every selenium request. Values must be strings.

default

{}

height

height: number

Height of the browser window in pixels.

Optional host

host: string

Host of your WebDriver server.

default

127.0.0.1

Optional intervals

intervals: IIntervals

Intervals (for waitXXX and eventuallyXXX actions) in milliseconds.

"default" property will be used for every waitXXX and eventuallyXXX action if not explicitly stated otherwise.

default

{default: 500}

Optional key

key: string

WebdriverIO supports Sauce Labs, Browserstack and Testing Bot (other cloud providers should work too though). These services define specific user and key (or access key) values you need to put in here in order to connect to these services.

default

undefined

Optional manualOnly

manualOnly: boolean

Do not run automatic testcases and consider only manual results.

default

{default: false}

Optional path

path: string

Path to WebDriver server.

default

/wd/hub

Optional port

port: number

Port your WebDriver server is on.

default

4444

Optional protocol

protocol: string

Protocol to use when communicating with the Selenium standalone server (or driver)

default

http

Optional proxy

proxy: String

An HTTP proxy to be used. Supports proxy Auth with Basic Auth, identical to support for the url parameter (by embedding the auth info in the uri)

default

undefined (no proxy used)

Optional queryParams

queryParams: Object

A key-value store of query parameters to be added to every selenium request.

default

{}

Optional reportErrorsInstantly

reportErrorsInstantly: boolean

If set to true, will output errors and validation failures immediately. Will be enabled by default if consoleLogLevel is set to 'steps'.

default

false

Optional retries

retries: number

Defines how many times a testcase should be rerun if it did not pass. The current testcase will be aborted on the first error or failed expectation and rerun times.

default

0

Optional seleniumInstallArgs

seleniumInstallArgs: InstallOpts

Arguments for install command of selenium-standalone service.

default

{}

Optional seleniumStartArgs

seleniumStartArgs: StartOpts

Arguments for start command of selenium-standalone service.

default

{}

Optional services

services: string[]

Webdriverio Services to run for test execution.

See http://webdriver.io/guide for more information.

default

['selenium-standalone']

Optional specSeverity

specSeverity: Severity[]

Restricts specs by severity set during their last execution.

example

["blocker", "critical", "normal", "minor", "trivial"] => these are all available severities - combine as you see fit

Optional specStatus

specStatus: ("passed" | "failed" | "broken" | "unvalidated" | "unknown" | "pending" | "faulty")[]

Restricts specs by status of their criteria set during their last execution.

example

["passed", "failed", "broken", "unvalidated", "unknown"] => these are all available status - combine as you see fit ["faulty"] => faulty is a shortcut for failed, broken, unvalidated and unknown

Optional specs

specs: string[]

Restricts test execution to these specs.

example

["3.2"] => execute all testcases which validate spec 3.2 ["1.1", "-1.1.2.4"] => 1.1 includes spec 1.1 and all of its sub-specs (eg. 1.1.2), -1.1.2.4 excludes spec 1.1.2.4 ["1."] => 1. excludes spec 1 itself but includes of of its sub-specs

testDir

testDir: string

Root directory for all system test artifacts of wdio-workflo.

If you set this value to something other than ${__dirname} + '/system_test, you need to make sure that the include array in workflo's tsconfig file tsconfig.workflo.json contains your testDir folder.

Optional testcaseSeverity

testcaseSeverity: Severity[]

Restricts testcases by severity set during their last execution.

example

["blocker", "critical", "normal", "minor", "trivial"] => these are all available severities - combine as you see fit

Optional testcaseStatus

testcaseStatus: ("passed" | "failed" | "broken" | "unknown" | "pending" | "faulty")[]

Restricts executed testcases by their result status set during their last execution.

example

["passed", "failed", "broken", "pending", "unknown"] => these are all available status - combine as you see fit ["faulty"] => faulty is a shortcut for failed, broken and unknown

Optional testcases

testcases: string[]

Restricts test execution to these testcases.

example

["Suite1", "Suite2.Testcase1"] => execute all testcases of Suite1 and Testcase1 of Suite2 ["Suite2", "-Suite2.Testcase2"] => execute all testcases of Suite2 except for Testcase2

Optional timeouts

timeouts: ITimeouts

Timeouts (for waitXXX and eventuallyXXX actions) in milliseconds.

"default" property will be used for every waitXXX and eventuallyXXX action if not explicitly stated otherwise.

default

{default: 5000}

Optional uidStorePath

uidStorePath: string

Path to the uidStore.json file which is used to generate unique ids during test execution.

The generated ids will be preserved for future test runs until the uidStore.json file is deleted.

Optional user

user: string

WebdriverIO supports Sauce Labs, Browserstack and Testing Bot (other cloud providers should work too though). These services define specific user and key (or access key) values you need to put in here in order to connect to these services.

default

undefined

width

width: number

Width of the browser window in pixels.

Methods

Optional after

  • after<T>(result: number, capabilities: ICapabilities[], testcaseFiles: string[]): Promise<T> | void
  • Gets executed after all tests are done. You still have access to all global variables from the test.

    Type parameters

    • T

    Parameters

    • result: number

      0 - test pass, 1 - test fail

    • capabilities: ICapabilities[]

      list of capabilities details

    • testcaseFiles: string[]

      List of testcases file paths that ran

    Returns Promise<T> | void

Optional afterCommand

  • afterCommand<T>(commandName: string, args: any[], result: number, error: Error): Promise<T> | void
  • Runs after a WebdriverIO command gets executed

    Type parameters

    • T

    Parameters

    • commandName: string

      hook command name

    • args: any[]

      arguments that command would receive

    • result: number

      0 - command success, 1 - command error

    • error: Error

      error object if any

    Returns Promise<T> | void

Optional afterHook

  • afterHook<T>(): Promise<T> | void
  • Hook that gets executed after a hook within the suite ends (e.g. runs after calling afterEach in Jasmine)

    Type parameters

    • T

    Returns Promise<T> | void

Optional afterSession

  • Gets executed right after terminating the webdriver session.

    This callback is only invoked during the "testcases" phase.

    Type parameters

    • T

    Parameters

    • config: ICallbackConfig

      wdio-workflo configuration object

    • capabilities: ICapabilities

      list of capabilities details

    • testcaseFiles: string[]

      List of testcases file paths that ran

    Returns Promise<T> | void

Optional afterSuite

  • afterSuite<T>(suite: Suite): Promise<T> | void
  • Hook that gets executed after the suite has ended

    Type parameters

    • T

    Parameters

    • suite: Suite

      suite details

    Returns Promise<T> | void

Optional afterTest

  • afterTest<T>(test: Test): Promise<T> | void
  • Function to be executed after a testcase ends.

    Type parameters

    • T

    Parameters

    • test: Test

      test details

    Returns Promise<T> | void

Optional afterValidator

  • afterValidator<T>(result: number, capabilities: ICapabilities[], specFiles: string[]): Promise<T> | void
  • Gets executed after all tests are done. You still have access to all global variables from the test.

    Type parameters

    • T

    Parameters

    • result: number

      0 - test pass, 1 - test fail

    • capabilities: ICapabilities[]

      list of capabilities details

    • specFiles: string[]

      List of spec file paths that ran

    Returns Promise<T> | void

Optional before

  • before<T>(capabilities: ICapabilities[], testcaseFiles: string[]): Promise<T> | void
  • Gets executed before testcases execution begins. At this point you can access to all global variables like browser. It is the perfect place to define custom commands.

    This callback is only invoked during the "testcases" phase.

    Type parameters

    • T

    Parameters

    • capabilities: ICapabilities[]

      list of capabilities details

    • testcaseFiles: string[]

      List of testcases file paths that are to be run

    Returns Promise<T> | void

Optional beforeCommand

  • beforeCommand<T>(commandName: string, args: any[]): Promise<T> | void
  • Runs before a WebdriverIO command gets executed.

    Type parameters

    • T

    Parameters

    • commandName: string

      hook command name

    • args: any[]

      arguments that command would receive

    Returns Promise<T> | void

Optional beforeHook

  • beforeHook<T>(): Promise<T> | void
  • Hook that gets executed before a hook within the suite starts (e.g. runs before calling beforeEach in Jasmine)

    Type parameters

    • T

    Returns Promise<T> | void

Optional beforeSession

  • Gets executed just before initialising the webdriver session and test framework. It allows you to manipulate configurations depending on the capability or testcase.

    This callback is only invoked during the "testcases" phase.

    Type parameters

    • T

    Parameters

    • config: ICallbackConfig

      wdio-workflo configuration object

    • capabilities: ICapabilities[]

      list of capabilities details

    • testcaseFiles: string[]

      List of testcases file paths that are to be run

    Returns Promise<T> | void

Optional beforeSuite

  • beforeSuite<T>(suite: Suite): Promise<T> | void
  • Hook that gets executed before the suite starts

    Type parameters

    • T

    Parameters

    • suite: Suite

      suite details

    Returns Promise<T> | void

Optional beforeTest

  • beforeTest<T>(test: Test): Promise<T> | void
  • Function to be executed before a testcase starts.

    Type parameters

    • T

    Parameters

    • test: Test

      test details

    Returns Promise<T> | void

Optional beforeValidator

  • beforeValidator<T>(capabilities: ICapabilities[], specFiles: string[]): Promise<T> | void
  • Gets executed before test execution begins. At this point you can access to all global variables like browser. It is the perfect place to define custom commands.

    This callback is only invoked during the "testcases" phase.

    Type parameters

    • T

    Parameters

    • capabilities: ICapabilities[]

      list of capabilities details

    • specFiles: string[]

      List of spec file paths that are to be run

    Returns Promise<T> | void

Optional onComplete

  • Gets executed after all workers got shut down and the process is about to exit.

    Type parameters

    • T

    Parameters

    • exitCode: number

      0 - success, 1 - fail

    • config: ICallbackConfig

      wdio-workflo configuration object

    • capabilities: ICapabilities[]

      list of capabilities details

    Returns Promise<T> | void

Optional onError

  • onError<T>(error: Error): Promise<T> | void
  • Gets executed when an error happens, good place to take a screenshot @ {Error} error

    Type parameters

    • T

    Parameters

    • error: Error

    Returns Promise<T> | void

Optional onPrepare

  • Gets executed once before all workers get launched.

    Type parameters

    • T

    Parameters

    Returns Promise<T> | void

Generated using TypeDoc