@@ -9,11 +9,7 @@ const __filename = fileURLToPath(import.meta.url);
99const __dirname = dirname ( __filename ) ;
1010
1111export const config : Options . Testrunner = {
12- //
13- // ====================
14- // Runner Configuration
15- // ====================
16- // WebdriverIO supports running e2e tests as well as unit and component tests.
12+
1713 runner : 'local' ,
1814 autoCompileOpts : {
1915 autoCompile : true ,
@@ -22,55 +18,12 @@ export const config: Options.Testrunner = {
2218 transpileOnly : true ,
2319 } ,
2420 } ,
25-
26-
27- // If you run your tests on Sauce Labs you can specify the region you want to run your tests
28- // in via the `region` property. Available short handles for regions are `us` (default), `eu` and `apac`.
29- // These regions are used for the Sauce Labs VM cloud and the Sauce Labs Real Device Cloud.
30- // If you don't provide the region it will default for the `us`
31-
32- //
33- // ==================
34- // Specify Test Files
35- // ==================
36- // Define which test specs should run. The pattern is relative to the directory
37- // of the configuration file being run.
38- //
39- // The specs are defined as an array of spec files (optionally using wildcards
40- // that will be expanded). The test for each spec file will be run in a separate
41- // worker process. In order to have a group of spec files run in the same worker
42- // process simply enclose them in an array within the specs array.
43- //
44- // The path of the spec files will be resolved relative from the directory of
45- // of the config file unless it's absolute.
46- //
4721 specs : [ './test/specs/*.ts' ] ,
4822 // Patterns to exclude.
4923 exclude : [
5024 // 'path/to/excluded/files'
5125 ] ,
52- //
53- // ============
54- // Capabilities
55- // ============
56- // Define your capabilities here. WebdriverIO can run multiple capabilities at the same
57- // time. Depending on the number of capabilities, WebdriverIO launches several test
58- // sessions. Within your capabilities you can overwrite the spec and exclude options in
59- // order to group specific specs to a specific capability.
60- //
61- // First, you can define how many instances should be started at the same time. Let's
62- // say you have 3 different capabilities (Chrome, Firefox, and Safari) and you have
63- // set maxInstances to 1; wdio will spawn 3 processes. Therefore, if you have 10 spec
64- // files and you set maxInstances to 10, all spec files will get tested at the same time
65- // and 30 processes will get spawned. The property handles how many capabilities
66- // from the same test should run tests.
67- //
6826 maxInstances : 1 ,
69- //
70- // If you have trouble getting all important capabilities together, check out the
71- // Sauce Labs platform configurator - a great tool to configure your capabilities:
72- // https://saucelabs.com/platform/platform-configurator
73- //
7427 capabilities : [
7528 {
7629 browserName : 'vscode' ,
@@ -87,94 +40,19 @@ export const config: Options.Testrunner = {
8740 } ,
8841 ] ,
8942
90- //
91- // ===================
92- // Test Configurations
93- // ===================
94- // Define all options that are relevant for the WebdriverIO instance here
95- //
96- // Level of logging verbosity: trace | debug | info | warn | error | silent
9743 logLevel : process . env . COVERAGE ? 'warn' : 'info' ,
9844
99- //
100- // Set specific log levels per logger
101- // loggers:
102- // - webdriver, webdriverio
103- // - @wdio/browserstack-service, @wdio/lighthouse-service, @wdio/sauce-service
104- // - @wdio/mocha-framework, @wdio/jasmine-framework
105- // - @wdio/local-runner
106- // - @wdio/sumologic-reporter
107- // - @wdio/cli, @wdio/config, @wdio/utils
108- // Level of logging verbosity: trace | debug | info | warn | error | silent
109- // logLevels: {
110- // webdriver: 'info',
111- // '@wdio/appium-service': 'info'
112- // },
113- //
114- // If you only want to run your tests until a specific amount of tests have failed use
115- // bail (default is 0 - don't bail, run all tests).
11645 bail : 0 ,
117- //
118- // Set a base URL in order to shorten url command calls. If your `url` parameter starts
119- // with `/`, the base url gets prepended, not including the path portion of your baseUrl.
120- // If your `url` parameter starts without a scheme or `/` (like `some/path`), the base url
121- // gets prepended directly.
122- // baseUrl: 'http://localhost:8080',
123- //
124- // Default timeout for all waitFor* commands.
12546 waitforTimeout : 10000 ,
126- //
127- // Default timeout in milliseconds for request
128- // if browser driver or grid doesn't send response
12947 connectionRetryTimeout : 120000 ,
130- //
131- // Default request retries count
13248 connectionRetryCount : 3 ,
133- //
134- // Test runner services
135- // Services take over a specific job you don't want to take care of. They enhance
136- // your test setup with almost no effort. Unlike plugins, they don't add new
137- // commands. Instead, they hook themselves up into the test process.
13849 services : [ 'vscode' ] ,
139-
140- // Framework you want to run your specs with.
141- // The following are supported: Mocha, Jasmine, and Cucumber
142- // see also: https://webdriver.io/docs/frameworks
143- //
144- // Make sure you have the wdio adapter package for the specific framework installed
145- // before running any tests.
14650 framework : 'mocha' ,
147-
148- //
149- // The number of times to retry the entire specfile when it fails as a whole
150- // specFileRetries: 1,
151- //
152- // Delay in seconds between the spec file retry attempts
153- // specFileRetriesDelay: 0,
154- //
155- // Whether or not retried spec files should be retried immediately or deferred to the end of the queue
156- // specFileRetriesDeferred: false,
157- //
158- // Test reporter for stdout.
159- // The only one supported by default is 'dot'
160- // see also: https://webdriver.io/docs/dot-reporter
16151 reporters : [ 'spec' ] ,
162-
163- // Options to be passed to Mocha.
164- // See the full list at http://mochajs.org/
16552 mochaOpts : {
16653 ui : 'bdd' ,
16754 timeout : 60000 ,
16855 } ,
169-
170- //
171- // =====
172- // Hooks
173- // =====
174- // WebdriverIO provides several hooks you can use to interfere with the test process in order to enhance
175- // it and to build services around it. You can either apply a single function or an array of
176- // methods to it. If one of them returns with a promise, WebdriverIO will wait until that promise got
177- // resolved to continue.
17856 /**
17957 * Gets executed once before all workers get launched.
18058 * @param {object } config wdio configuration object
0 commit comments