-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathwdio.conf.js
53 lines (51 loc) · 1.25 KB
/
wdio.conf.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
const attachProxy = require('emailjs-tcp-proxy').default
const express = require('express')
const { Server } = require('http')
const path = require('path')
const echo = require('./test/echo')
const { startServers, stopServers } = echo()
const app = express()
const server = Server(app)
app.use('/', express.static(path.join(__dirname, 'test', 'ws')))
attachProxy(server)
exports.config = {
specs: [
'./test/ws/*-integration.js'
],
maxInstances: 1,
capabilities: [{
maxInstances: 1,
browserName: 'chrome'
}],
sync: true,
logLevel: 'error',
coloredLogs: true,
deprecationWarnings: true,
bail: 0,
screenshotPath: './test/ws/error-shots/',
baseUrl: 'http://localhost:12345/',
waitforTimeout: 100000,
connectionRetryTimeout: 90000,
connectionRetryCount: 3,
services: ['chromedriver'],
framework: 'mocha',
port: '9515',
path: '/',
mochaOpts: {
ui: 'bdd'
},
beforeSession: function (config, capabilities, specs) {
startServers()
server.listen(12345)
},
before: function (capabilities, specs) {
var chai = require('chai')
global.expect = chai.expect
},
after: function (result, capabilities, specs) {
},
afterSession: function (config, capabilities, specs) {
server.close()
stopServers()
}
}