externalWebdriverIOConfig
Hierarchy
- Testrunner
- WebdriverIOConfig
Index
Properties
- serenity
- protocol
- hostname
- port
- path
- queryParams
- user
- key
- logLevel
- logLevels
- connectionRetryTimeout
- connectionRetryCount
- headers
- agent
- transformRequest
- transformResponse
- enableDirectConnect
- strictSSL
- outputDir
- cacheDir
- automationProtocol
- region
- headless
- baseUrl
- waitforTimeout
- waitforInterval
- capabilities
- runner
- rootDir
- specs
- exclude
- suites
- maxInstances
- maxInstancesPerCapability
- injectGlobals
- bail
- updateSnapshots
- resolveSnapshotPath
- specFileRetries
- specFileRetriesDelay
- specFileRetriesDeferred
- groupLogsByTestSpec
- services
- framework
- reporters
- reporterSyncInterval
- reporterSyncTimeout
- execArgv
- runnerEnv
- filesToWatch
- cucumberFeaturesWithLineNumbers
- watch
- shard
- mochaOpts
- jasmineOpts
- cucumberOpts
- autoCompileOpts
Methods
Properties
externaloptionalserenity
Serenity/JS configuration with an additional runner
entry
allowing to specify the test runner, such as cucumber
, mocha
, or jasmine
.
Learn more
externaloptionalprotocol
Protocol to use when communicating with the Selenium standalone server (or driver).
externaloptionalhostname
Host of your WebDriver server.
externaloptionalport
Port your WebDriver server is on.
externaloptionalpath
Path to WebDriver endpoint or grid server.
externaloptionalqueryParams
Query paramaters that are propagated to the driver server.
Type declaration
[name string]: string
externaloptionaluser
Your cloud service username (only works for Sauce Labs, Browserstack, TestingBot, CrossBrowserTesting or LambdaTest accounts). If set, WebdriverIO will automatically set connection options for you. If you don't use a cloud provider this can be used to authenticate any other WebDriver backend.
externaloptionalkey
Your cloud service access key or secret key (only works for Sauce Labs, Browserstack, TestingBot, CrossBrowserTesting or LambdaTest accounts). If set, WebdriverIO will automatically set connection options for you. If you don't use a cloud provider this can be used to authenticate any other WebDriver backend.
externaloptionallogLevel
Level of logging verbosity.
externaloptionallogLevels
Set specific log levels per logger use 'silent' level to disable logger
externaloptionalconnectionRetryTimeout
Timeout for any WebDriver request to a driver or grid.
externaloptionalconnectionRetryCount
Count of request retries to the Selenium server.
externaloptionalheaders
Specify custom headers to pass into every request.
Type declaration
[name string]: string
externaloptionalagent
Allows you to use a custom http/https/http2 agent to make requests.
Type declaration
externalhttp: Agent
externalhttps: Agent
externaloptionaltransformRequest
Function intercepting HTTP request options before a WebDriver request is made.
Type declaration
Parameters
externalrequestOptions: RequestLibOptions
Returns RequestLibOptions
externaloptionaltransformResponse
Function intercepting HTTP response objects after a WebDriver response has arrived.
Type declaration
Parameters
externalresponse: RequestLibResponse
externalrequestOptions: RequestLibOptions
Returns RequestLibResponse
externaloptionalenableDirectConnect
Appium direct connect options (see: https://appiumpro.com/editions/86-connecting-directly-to-appium-hosts-in-distributed-environments)
externaloptionalstrictSSL
Whether it requires SSL certificates to be valid in HTTP/s requests for an environment which cannot get process environment well.
externaloptionaloutputDir
Directory to store all testrunner log files (including reporter logs and wdio
logs).
If not set, all logs are streamed to stdout
. Since most reporters are made to log to
stdout
, it is recommended to only use this option for specific reporters where it
makes more sense to push report into a file (like the junit
reporter, for example).
When running in standalone mode, the only log generated by WebdriverIO will be
the wdio
log.
externaloptionalcacheDir
The path to the root of the cache directory. This directory is used to store all drivers that are downloaded when attempting to start a session.
externaloptionalautomationProtocol
externaloptionalregion
If running on Sauce Labs, you can choose to run tests between different data centers: US or EU. To change your region to EU, add region: 'eu' to your config.
externaloptionalheadless
Sauce Labs provides a headless offering that allows you to run Chrome and Firefox tests headless.
externaloptionalbaseUrl
Shorten url command calls by setting a base URL.
externaloptionalwaitforTimeout
Default timeout for all waitFor*
commands. (Note the lowercase f in the option name.)
This timeout only affects commands starting with waitFor*
and their default wait time.
externaloptionalwaitforInterval
Default interval for all waitFor*
commands to check if an expected state (e.g.,
visibility) has been changed.
externalcapabilities
Defines a set of capabilities you want to run in your testrunner session. Check out the WebDriver Protocol for more details. If you want to run a multiremote session you need to define instead of an array of capabilities an object that has an arbitrary browser instance name as string and its capabilities as values.
externaloptionalrunner
Type of runner
- local: every spec file group is spawned in its own local process running an independant browser session
- browser: all spec files are run within the browser
externaloptionalrootDir
Project root directory path.
externaloptionalspecs
Define specs for test execution. You can either specify a glob pattern to match multiple files at once or wrap a glob or set of paths into an array to run them within a single worker process.
externaloptionalexclude
Exclude specs from test execution.
externaloptionalsuites
An object describing various of suites, which you can then specify with the --suite option on the wdio CLI.
externaloptionalmaxInstances
Maximum number of total parallel running workers.
externaloptionalmaxInstancesPerCapability
Maximum number of total parallel running workers per capability.
externaloptionalinjectGlobals
Inserts WebdriverIO's globals (e.g. browser
, $
and $$
) into the
global environment. If you set to false
, you should import from
@wdio/globals
, e.g.:
import { browser, $, $$, expect } from '@wdio/globals'
Note: WebdriverIO doesn't handle injection of test framework specific globals.
externaloptionalbail
If you want your test run to stop after a specific number of test failures, use bail. (It defaults to 0, which runs all tests no matter what.) Note: Please be aware that when using a third party test runner (such as Mocha), additional configuration might be required.
externaloptionalupdateSnapshots
Set to true if you want to update your snapshots.
externaloptionalresolveSnapshotPath
Overrides default snapshot path. For example, to store snapshots next to test files.
Type declaration
Parameters
externaltestPath: string
externalsnapExtension: string
Returns string
externaloptionalspecFileRetries
The number of retry attempts for an entire specfile when it fails as a whole.
externaloptionalspecFileRetriesDelay
Delay in seconds between the spec file retry attempts
externaloptionalspecFileRetriesDeferred
Whether or not retried spec files should be retried immediately or deferred to the end of the queue
externaloptionalgroupLogsByTestSpec
Choose the log output view. If set to "false" logs from different test files will be printed in real-time. Please note that this may result in the mixing of log outputs from different Test Specs when running in parallel. If set to "true" log outputs will be grouped by test files and printed only when the test is completed. By default, it is set to "false" so logs are printed in real-time.
externaloptionalservices
Services take over a specific job you don't want to take care of. They enhance your test setup with almost no effort.
externaloptionalframework
Defines the test framework to be used by the WDIO testrunner.
externaloptionalreporters
List of reporters to use. A reporter can be either a string, or an array of
['reporterName', { <reporter options> }]
where the first element is a string
with the reporter name and the second element an object with reporter options.
externaloptionalreporterSyncInterval
Determines in which interval the reporter should check if they are synchronised if they report their logs asynchronously (e.g. if logs are streamed to a 3rd party vendor).
externaloptionalreporterSyncTimeout
Determines the maximum time reporters have to finish uploading all their logs until an error is being thrown by the testrunner.
externaloptionalexecArgv
Node arguments to specify when launching child processes.
externaloptionalrunnerEnv
A set of environment variables to be injected into the worker process.
externaloptionalfilesToWatch
Files to watch when running wdio
with the --watch
flag.
externaloptionalcucumberFeaturesWithLineNumbers
List of cucumber features with line numbers (when using cucumber framework).
externaloptionalwatch
flags
externaloptionalshard
Shard tests and execute only the selected shard. Specify in the one-based form like { total: 5, current: 2 }
.
externaloptionalmochaOpts
framework options
externaloptionaljasmineOpts
externaloptionalcucumberOpts
externaloptionalautoCompileOpts
autocompile options
WebdriverIO configuration object, with Serenity/JS-specific additions.
Integrating WebdriverIO with Serenity/JS
Learn more
CucumberConfig
JasmineConfig
MochaConfig