-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.js
60 lines (56 loc) · 2.06 KB
/
run.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
54
55
56
57
58
59
60
const { Codecept } = require('codeceptjs')
const BROWSERSTACK_USERNAME = ''
const BROWSERSTACK_KEY = ''
const config = {
platformDomain: 'adcat.test',
tests: __dirname + 'test.js',
output: './output',
bootstrap: () => {},
teardown: () => {},
mocha: {},
plugins: {},
helpers: {
screenshotHelper: {
require: './screenshotHelper.js'
},
WebDriver: {
url: 'https://test.celtra.com',
restart: false,
host: 'hub-cloud.browserstack.com',
port: 4444,
waitForTimeout: 5000,
browser: 'Chrome',
platform: 'Android',
desiredCapabilities: {
'bstack:options': {
buildName: 'test-scripting',
acceptInsecureCerts: true,
networkLogs: true,
userName: BROWSERSTACK_USERNAME,
accessKey: BROWSERSTACK_KEY,
osVersion: '13.0',
deviceName: 'Samsung Galaxy S23',
local: false,
}
// When running Appium instead of WebDriver use following capabilities for W3C:
// buildName: 'test-scripting',
// 'browserstack.acceptInsecureCerts': true,
// 'browserstack.networkLogs': true,
// 'browserstack.userName': BROWSERSTACK_USERNAME,
// 'browserstack.accessKey': BROWSERSTACK_KEY,
// 'browserstack.networkLogsExcludeHosts': [
// 'googleads.g.doubleclick.net',
// 'pubads.g.doubleclick.net',
// 'securepubads.g.doubleclick.net'
// ],
// osVersion: '13.0',
// platformName: 'Android',
// deviceName: 'Samsung Galaxy S23'
}
}
}
}
const codecept = new Codecept(config, { steps: true, verbose: true })
codecept.init(__dirname)
codecept.loadTests(__dirname + '/webTest.js')
codecept.run().then(() => console.log('Done'))