-
Notifications
You must be signed in to change notification settings - Fork 12
/
wdio.conf.js
49 lines (47 loc) · 1.29 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
const takeScreenshot = require("./utils/helper").takeScreenshot
/*
require('dotenv').config()
const reportportal = require('wdio-reportportal-reporter');
const RpService = require("wdio-reportportal-service");
const conf = JSON.parse(require('fs').readFileSync('reportportal.config.json'));
conf.reportPortalClientConfig.token = process.env.RP_USERUUID
conf.reportPortalClientConfig.endpoint = process.env.RP_ENDPOINT
conf.reportPortalClientConfig.project = process.env.RP_PROJECT
*/
exports.config = {
runner: "local",
hostname: "localhost",
port: 4444,
path: "/wd/hub",
specs: [
"./test/specs/**/*.js"
],
maxInstances: 10,
capabilities: [{
maxInstances: 5,
browserName: "chrome",
}],
logLevel: "info",
bail: 0,
baseUrl: "http://automationpractice.com",
waitforTimeout: 10000,
connectionRetryTimeout: 90000,
connectionRetryCount: 3,
framework: "mocha",
// services: [[RpService, {}]],
// reporters: [[reportportal, conf]],
reporters: [["allure", {
outputDir: "./logs/results/",
disableWebdriverStepsReporting: true,
disableWebdriverScreenshotsReporting: false,
}]],
mochaOpts: {
ui: "bdd",
timeout: 60000
},
afterTest(test) {
if (test.passed === false) {
takeScreenshot("./logs/screenshot/", "screenshot_fail.png")
}
}
}