froth-webdriverio-framework 7.0.42 → 7.0.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,409 +0,0 @@
1
- const path = require('path');
2
- const url = require('url');
3
- const fs = require('fs');
4
- const { LocalStorage } = require('node-localstorage');
5
- global.BUFFER = new LocalStorage('./storage');
6
- const setAllDetails = require("./setallDatailinBuffer")
7
- const exeDetails = require("../froth_api_calls/getexecutionDetails")
8
- const getBSSessionDetails = require("../froth_api_calls/browsersatckSessionInfo").getBSSessionDetails;
9
- const { fail } = require("assert");
10
- const { error } = require('console');
11
- //const isBrowserStackEnabled = process.env.BROWSERSTACK;
12
- let starttime;
13
- let endtime;
14
- let duration_tests = 0;
15
- console.log('===== common config===== ');
16
- const resultdetails = {
17
- comments: [],
18
- excution_status: null, // Pass/Fail
19
- excution_time: null, // Execution time in milliseconds
20
- };
21
- // Description: This file contains the common configuration for the webdriverio framework.
22
- const commonconfig = {
23
-
24
- onPrepare: async function (capabilities, specs) {
25
- try {
26
-
27
- console.log('==== ON PREPARE HOOK ====');
28
- // This code runs before the test suite starts
29
- await setAllDetails.setEnvVariables();
30
- await setAllDetails.setExecutionDetails();
31
- await setAllDetails.setSuiteDetails();
32
- await setAllDetails.setTestDataDetails();
33
- console.log("on prepare:", JSON.stringify(capabilities))
34
-
35
- // console.log("ALL JSON DATA in env variable :" + JSON.stringify(process.env));
36
- } catch (e) {
37
- console.log("====> Error in onPrepare:", e);
38
-
39
- }
40
- },
41
-
42
-
43
- beforeSession: async function (config, capabilities, specs) {
44
- try {
45
- let syntaxFailed = false;
46
-
47
- console.log('==== BEFORE SESSION HOOK ====');
48
- // Perform any setup or pre-test actions here
49
- console.log("specdat:", specs);
50
- console.log("length:", specs.length);
51
- //checking the syntax error in the test files
52
- for (const fileUrl of specs) {
53
- const filePath = url.fileURLToPath(fileUrl); // convert file:// URL to file path
54
- try {
55
- const code = fs.readFileSync(filePath, 'utf8');
56
- new Function(code); // Try to compile
57
- } catch (err) {
58
- // Extract line number from stack trace
59
- const match = err.stack.match(/\((.*):(\d+):(\d+)\)/);
60
- const lineInfo = match ? ` at line ${match[2]}, column ${match[3]}` : '';
61
-
62
- const errorMsg = `❌ Syntax error in '${path.basename(filePath)}'${lineInfo}: ${err.message}`;
63
- console.error("🚨", errorMsg);
64
- resultdetails.comments.push(errorMsg);
65
- syntaxFailed = true;
66
- }
67
- }
68
- if (syntaxFailed) {
69
- resultdetails.excution_status = 'FAILED';
70
- await exeDetails.updateExecuitonDetails(
71
- BUFFER.getItem("ORGANISATION_DOMAIN_URL"),
72
- BUFFER.getItem("FROTH_LOGIN_TOKEN"),
73
- BUFFER.getItem("FROTH_EXECUTION_ID"),
74
- resultdetails
75
- );
76
- process.exit(1);
77
- }
78
- // set the capability like media and app and bs local
79
- // if (process.env.PLATFORM === 'browserstack') {
80
- // /// console.log("capabilities:", capabilities);
81
- // capabilities.browserstackLocal = process.env.BROWSERSTACK_LOCAL;
82
- // // capabilities.accessKey = Buffer.from(capabilities.accessKey, 'base64').toString('utf-8');
83
- // if (capabilities.platformName === 'android' || capabilities.platformName === 'ios') {
84
- // capabilities.app = process.env.BROWSERSTACK_APP_PATH;
85
- // if (capabilities.app === undefined || capabilities.app === null || capabilities.app === '') {
86
- // console.error("🚨 Error: BROWSERSTACK_APP_PATH is not defined or empty.");
87
- // resultdetails.excution_status = 'FAILED';
88
- // resultdetails.comments.push("BROWSERSTACK_APP_PATH is not defined or empty.");
89
- // await exeDetails.updateExecuitonDetails(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("FROTH_LOGIN_TOKEN"), BUFFER.getItem("FROTH_EXECUTION_ID"), resultdetails);
90
- // process.exit(1); // Stop execution if app path is not set
91
- // } else {
92
- // console.log("App Path:", capabilities.app);
93
- // console.log("Browserstack Local:", capabilities.browserstackLocal);
94
- // }
95
- // }
96
-
97
- // try {
98
- // let mediaFiles = process.env.MEDIA_FILES ? JSON.parse(process.env.MEDIA_FILES) : [];
99
- // console.log("Size of Media Files:", Array.isArray(mediaFiles) ? mediaFiles.length : "Invalid data");
100
-
101
- // if (Array.isArray(mediaFiles) && mediaFiles.length > 0) {
102
- // console.log("Media Files:", JSON.parse(process.env.MEDIA_FILES));
103
- // capabilities['browserstack.uploadMedia'] = JSON.parse(process.env.MEDIA_FILES);
104
- // }
105
- // } catch (error) {
106
- // console.error("Error parsing MEDIA_FILES:", error);
107
- // }
108
-
109
- // console.log(`Running tests on after app,bslocal,mediafiles: ${JSON.stringify(capabilities)}`);
110
- // }
111
-
112
- } catch (error) {
113
- console.error('🚨 Error in beforeSession:', error);
114
- console.error('🚨 Error in beforeSession:', error.message);
115
- resultdetails.excution_status = 'FAILED';
116
- resultdetails.comments.push("Session creation failed:", error.message);
117
- await exeDetails.updateExecuitonDetails(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("FROTH_LOGIN_TOKEN"), BUFFER.getItem("FROTH_EXECUTION_ID"), resultdetails)
118
- // throw new Error(`Session creation failed: ${error.message}`);
119
- process.exit(1); // Stop execution if session creation fails
120
-
121
- }
122
-
123
-
124
- },
125
- /**
126
- * Gets executed before the suite starts (in Mocha/Jasmine only).
127
- * @param {object} suite suite details
128
- */
129
- beforeSuite: async function (suite) {
130
- try {
131
- console.log('==== BEFORE SUITE HOOK ====');
132
- console.log(`====> Test suite has been started ' ${suite.title}' `,);
133
-
134
- starttime = new Date().getTime();
135
-
136
- if (process.env.PLATFORM === 'browserstack')
137
- await getBSSessionDetails(process.env.BS_SESSION_TYPE, process.env.BROWSERSTACK_USERNAME, process.env.BROWSERSTACK_ACCESS_KEY);
138
-
139
-
140
- // const resultdetails = {};
141
- await exeDetails.update_CICDRUNID_ReportUrl(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("FROTH_LOGIN_TOKEN"), BUFFER.getItem("FROTH_EXECUTION_ID"))
142
- BUFFER.setItem("UPDATE_EXECUTION", 'FALSE') //i need to recall
143
-
144
- } catch (e) {
145
- console.log("Error in beforeSuite:", e);
146
- }
147
- },
148
-
149
- before: async function (capabilities, specs) {
150
- if (process.env.BS_SESSION_TYPE === 'automate') {
151
- console.log('==== BEFORE HOOK ====')
152
- await browser.maximizeWindow()
153
- }
154
- else {
155
- console.log('==== BEFORE HOOK FOR MOBILE ====');
156
- }
157
-
158
- },
159
-
160
- /**
161
- * Function to be executed before a test (in Mocha/Jasmine only)
162
- * @param {object} test test object
163
- * @param {object} context scope object the test was executed with
164
- */
165
- beforeTest: async function (test, context) {
166
-
167
- console.log('==== BEFORE TEST HOOK ====');
168
- console.log(`====> Test Started '${test.title}'`);
169
-
170
- },
171
-
172
-
173
- /**
174
- * Function to be executed after a test (in Mocha/Jasmine only)
175
- * @param {object} test test object
176
- * @param {object} context scope object the test was executed with
177
- * @param {Error} result.error error object in case the test fails, otherwise `undefined`
178
- * @param {*} result.result return object of test function
179
- * @param {number} result.duration duration of test
180
- * @param {boolean} result.passed true if test has passed, otherwise false
181
- * @param {object} result.retries information about spec related retries, e.g. `{ attempts: 0, limit: 0 }`
182
- */
183
- afterTest: async function (test, context, { error, result, duration, passed, retries }) {
184
- console.log('==== AFTER TEST HOOK ====');
185
- console.log(`====> Test name finished '${test.title}'`);
186
-
187
- const fileName = path.basename(test.file);
188
- console.log('====> Test File Name:', fileName);
189
- // BUFFER.setItem("FROTH_TOTAL_DURATION", Number(BUFFER.getItem("FROTH_TOTAL_DURATION")) + duration)
190
- console.log(`====> Total Duration for this test: ${duration}ms`);
191
- duration_tests += duration;
192
- console.log(`====> Total Duration for all tests: ${duration_tests}ms`);
193
- console.log(`====> Status of test: ${passed}`);
194
-
195
- let scriptresult = "NOT RUN";
196
- // Default assumption: test passed (unless soft assertion failed)
197
- let finalPassed = passed;
198
-
199
- if (passed) {
200
- scriptresult = "PASSED"
201
- resultdetails.comments.push(`${test.title} - passed`);
202
- console.log(`====> resultdetails comments: ${resultdetails.comments}`);
203
- }
204
- else if (!finalPassed || error) {
205
- scriptresult = "FAILED"
206
- console.log(`====> Failed or error while executing the test: ${error ? error.message : "Test failed"}`);
207
- if (!resultdetails.comments.some(comment => typeof comment === 'string' && comment.includes(test.title)))
208
- resultdetails.comments.push(`${test.title} - failed: ${error ? error.message : "Test failed"}`);
209
-
210
- }
211
-
212
- let scriptDetails = BUFFER.getItem("FROTHE_SUITE_DETAILS");
213
- if (typeof scriptDetails === "string") {
214
- scriptDetails = JSON.parse(scriptDetails);
215
- }
216
- const jwtScript = scriptDetails.find(s => s.scriptName === fileName.replace(".js", ""));
217
- console.log("jwtScript:", jwtScript);
218
-
219
- await exeDetails.updateScriptExecutionStatus(
220
- BUFFER.getItem("ORGANISATION_DOMAIN_URL"),
221
- BUFFER.getItem("FROTH_LOGIN_TOKEN"),
222
- jwtScript.scriptId,
223
- jwtScript.platform.toLowerCase(),
224
- scriptresult)
225
-
226
-
227
- },
228
- /**
229
- * Hook that gets executed after the suite has ended (in Mocha/Jasmine only).
230
- * @param {object} suite suite details
231
- */
232
- afterSuite: async function (suite) {
233
- console.log('==== AFTER SUITE HOOK ====');
234
- console.log(`====> Test suite has completed '${suite.title}'`);
235
- },
236
- /**
237
- * Gets executed after all tests are done. You still have access to all global variables from
238
- * the test.
239
- * @param {number} result 0 - test pass, 1 - test fail
240
- * @param {Array.<Object>} capabilities list of capabilities details
241
- * @param {Array.<String>} specs List of spec file paths that ran
242
- */
243
- after: async function (result, config, capabilities, specs) {
244
- console.log('==== AFTER HOOK ====');
245
- console.log('====> All tests are completed.' + result);
246
- BUFFER.setItem("RESULT_DATA", result);
247
- console.log("====> Result data :" + BUFFER.getItem("RESULT_DATA"))
248
- resultdetails.excution_status = BUFFER.getItem("RESULT_DATA") == 0 ? 'PASSED' : 'FAILED'
249
- console.log("====> Total Duration taken for the suite:" + BUFFER.getItem("FROTH_TOTAL_DURATION"));
250
- console.log("====> Execution Status from results" + resultdetails.excution_status);
251
- // Capture WebDriver session errors
252
-
253
- if (result !== 0) {
254
- if (resultdetails.comments.length === 0) {
255
- resultdetails.comments.push("❌ WebDriver session failed or timed out.");
256
- }
257
- resultdetails.comments.push(`Execution failed with exit code: ${result}`);
258
-
259
- process.on('uncaughtException', (err) => {
260
- console.error("Uncaught Exception:", err);
261
- resultdetails.comments.push(`Execution failed : ${err}`);
262
- });
263
-
264
- }
265
-
266
- },
267
-
268
- onError: async function (error) {
269
- console.error('==== ON ERROR HOOK ====');
270
- console.error('====> Error occurred:', error.message);
271
- if (error.message.includes('Automate testing time expired')) {
272
- console.log('❌ Global error: Session timed out on BrowserStack.');
273
- resultdetails.excution_status = 'FAILED';
274
- resultdetails.comments.push(`Global error: Session timed out on BrowserStack.Please check ths session: ${result}`);
275
-
276
- await exeDetails.updateExecuitonDetails(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("FROTH_LOGIN_TOKEN"), BUFFER.getItem("FROTH_EXECUTION_ID"), resultdetails)
277
- process.exit(1); // Stop execution if session timed out
278
- }
279
- },
280
- afterSession: async function (config, capabilities, specs) {
281
- console.log('==== AFTER SESSION HOOK ====');
282
- console.log('====> This is the aftersession hook');
283
- // console.log("Capabilities:", capabilities);
284
- console.log("Specs:", specs);
285
- //console.log("Config:", config);
286
-
287
- process.on('uncaughtException', (err) => {
288
- console.error("Uncaught Exception:", err);
289
- resultdetails.comments.push(`Execution failed with exit code: ${err}`);
290
- });
291
-
292
- // Capture unhandled promise rejections
293
- process.on('unhandledRejection', (reason, promise) => {
294
- console.error("Unhandled Promise Rejection:", reason);
295
- resultdetails.comments.push(`Execution failed with exit code: ${reason}`);
296
- });
297
-
298
- endtime = new Date().getTime();
299
- let totalDuration = endtime - starttime;
300
- console.log("====> Total Duration taken for :" + BUFFER.getItem("FROTH_TOTAL_DURATION"));
301
- console.log("====> Total Duration in after session based on start time and end time:" + totalDuration);
302
- console.log("====> Total Duration in after session based on summing up the test execution times:" + duration_tests);
303
-
304
- resultdetails.excution_status = BUFFER.getItem("RESULT_DATA") == 0 ? 'PASSED' : 'FAILED'
305
- const frothDuration = BUFFER.getItem("FROTH_TOTAL_DURATION");
306
-
307
- if (await isInvalidDuration(frothDuration)) {
308
- // console.log("inside froth duration");
309
- if (await isInvalidDuration(duration_tests)) {
310
- console.log("inside froth duration_tests");
311
- resultdetails.excution_time = await millisecondsToTime(totalDuration);
312
- } else {
313
- console.log("inside froth duration_tests comparision");
314
- if (totalDuration > duration_tests)
315
- resultdetails.excution_time = await millisecondsToTime(totalDuration);
316
- else
317
- resultdetails.excution_time = await millisecondsToTime(duration_tests);
318
- }
319
- } else {
320
- console.log("inside froth duration else");
321
- resultdetails.excution_time = await secondsToTime(frothDuration);
322
- }
323
-
324
- console.log("====> Total Duration calculation:" + resultdetails.excution_time);
325
-
326
- await exeDetails.updateExecuitonDetails(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("FROTH_LOGIN_TOKEN"), BUFFER.getItem("FROTH_EXECUTION_ID"), resultdetails)
327
-
328
- // Perform any cleanup or post-test actions here
329
- BUFFER.clear();
330
- },
331
-
332
- onComplete: async function (exitCode, config, capabilities, results) {
333
- console.log('==== ON COMPLETE HOOK ====');
334
- console.log('====> Results:', results);
335
- console.log('==== Test Results Summary ======');
336
- console.log('Total Tests:', results.total);
337
- console.log('Passed:', results.passed);
338
- console.log('Failed:', results.failed);
339
- console.log('Exit Code:', exitCode);
340
-
341
- console.log('==== ALL TESTS ARE COMPLETED ====');
342
- return exitCode;
343
- }
344
-
345
- };
346
- async function isInvalidDuration(val) {
347
- console.log("val in isValidDuration:" + val);
348
- // Check if the value is null, 0, or undefined
349
- let isValid;
350
- if (typeof val === 'string') {
351
- val = val.trim().toLowerCase();
352
- isValid = val === "null" || val === "0" || val === "undefined";
353
-
354
- } else
355
- isValid = val === null || val === 0 || val === undefined;
356
-
357
- console.log("isValid in isValidDuration:" + isValid);
358
-
359
- return isValid;
360
- }
361
- async function secondsToTime(secs) {
362
- console.log("secs in secondsToTime :" + secs);
363
- let hours = Math.floor(secs / 3600);
364
- let minutes = Math.floor((secs % 3600) / 60);
365
- let seconds = secs % 60;
366
-
367
- // Adding leading zeros if the value is less than 10
368
- if (hours < 10) hours = '0' + hours;
369
- if (minutes < 10) minutes = '0' + minutes;
370
- if (seconds < 10) seconds = '0' + seconds;
371
- console.log("Time:" + hours + ':' + minutes + ':' + seconds);
372
- return hours + ':' + minutes + ':' + seconds;
373
- }
374
- async function millisecondsToTime(ms) {
375
- console.log("ms in millisecondsToTime: " + ms);
376
-
377
- // Ensure input is a number
378
- ms = Number(ms);
379
- if (isNaN(ms)) {
380
- return '00:00:00';
381
- }
382
-
383
- let totalSeconds = Math.floor(ms / 1000);
384
- let hours = Math.floor(totalSeconds / 3600);
385
- let minutes = Math.floor((totalSeconds % 3600) / 60);
386
- let seconds = totalSeconds % 60;
387
-
388
- // Pad with leading zeros
389
- hours = hours < 10 ? '0' + hours : hours;
390
- minutes = minutes < 10 ? '0' + minutes : minutes;
391
- seconds = seconds < 10 ? '0' + seconds : seconds;
392
-
393
- const timeStr = `${hours}:${minutes}:${seconds}`;
394
- console.log("Formatted time:", timeStr);
395
- return timeStr;
396
- }
397
-
398
- async function convertTimetoHHMMSS(time) {
399
- const seconds = Math.floor((time / 1000) % 60);
400
- const minutes = Math.floor((time / (1000 * 60)) % 60);
401
- const hours = Math.floor((time / (1000 * 60 * 60)) % 24);
402
- const formattedTime = `${String(hours).padStart(2, '0')}:${String(minutes).padStart(2, '0')}:${String(seconds).padStart(2, '0')}`;
403
-
404
- console.log("Time:" + hours + ':' + minutes + ':' + seconds);
405
-
406
- return formattedTime;
407
- }
408
-
409
- module.exports = commonconfig;
@@ -1,100 +0,0 @@
1
- const getLoginToken = require("../froth_api_calls/loginapi");
2
- const exeDetails = require("../froth_api_calls/getexecutionDetails")
3
- //const getintegrationdetails = require("../froth_api_calls/getintegrationDetails");
4
- const getSuiteDetails = require("../froth_api_calls/getsuiteDetails");
5
- const getDataById = require("../froth_api_calls/readTestdata");
6
-
7
- async function generateBuildNumber() {
8
- try {
9
- const now = await new Date();
10
- const timestamp = await formatDate(now); // Format date as needed
11
-
12
- // Construct the build number with timestamp and counter
13
- const buildNumber = `${timestamp}`;
14
- process.env.BUILD_NUMBER = buildNumber;
15
- console.log("Generated Build Number:", buildNumber);
16
- // Increment the counter for the next build
17
- } catch (error) {
18
- console.log("error in generateBuildNumber")
19
- }
20
- //return buildNumber;
21
- }
22
-
23
- async function formatDate(date) {
24
- const year = await date.getFullYear();
25
- const month = await padZero(date.getMonth() + 1); // Month is zero-indexed
26
- const day = await padZero(date.getDate());
27
- const hours = await padZero(date.getHours());
28
- const minutes = await padZero(date.getMinutes());
29
- const seconds =await padZero(date.getSeconds());
30
-
31
- return `${year}${month}${day}_${hours}${minutes}${seconds}`;
32
- }
33
-
34
- async function padZero(num) {
35
- return await num.toString().padStart(2, '0');
36
- }
37
-
38
- async function setEnvVariables() {
39
- await generateBuildNumber();
40
- await BUFFER.setItem("FROTH_TOTAL_DURATION", 0);
41
- await BUFFER.setItem("FROTH_EXECUTION_ID", process.env.EXECUTION_ID || 1);
42
- await BUFFER.setItem("ORGANISATION_DOMAIN_URL", process.env.ORGANISATION_DOMAIN_URL || "https://devapi.frothtestops.com");
43
- await BUFFER.setItem("FROTH_LOGIN_TOKEN", process.env.API_TOKEN)
44
- console.log("api token in set evn variable :" + BUFFER.getItem("FROTH_LOGIN_TOKEN"))
45
- console.log("CICD_RUN_ID in set evn variable :" + process.env.CICD_RUN_ID)
46
- }
47
-
48
- async function setLoginToken() {
49
- try {
50
-
51
- const getToken = await getLoginToken(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("SERVICE_USER"), BUFFER.getItem("SERVICE_PASSWORD"));
52
- process.env.FROTH_LOGIN_TOKEN = getToken;
53
- BUFFER.setItem("FROTH_LOGIN_TOKEN", getToken)
54
-
55
- } catch (error) {
56
- // console.error('Error in main function:', error);
57
- }
58
- }
59
-
60
- async function setExecutionDetails() {
61
- try {
62
- const getExeDetails = await exeDetails.getExecuitonDetails(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("FROTH_LOGIN_TOKEN"), BUFFER.getItem("FROTH_EXECUTION_ID"));
63
- process.env.AUTOMATION_SUITE_ID = getExeDetails.automation_suite_id;
64
- process.env.BROWSERSTACK_LOCAL = getExeDetails.browser_stack_local;
65
- process.env.BROWSERSTACK_APP_PATH = getExeDetails.app_url;
66
- process.env.MEDIA_FILES = JSON.stringify(getExeDetails.mediaurls);
67
- console.log("Execution Details:", JSON.stringify(getExeDetails));
68
-
69
- } catch (error) {
70
- // console.error('Error in main function:', error);
71
- }
72
- }
73
-
74
-
75
- async function setSuiteDetails() {
76
- try {
77
- const getSuiteDetail = await getSuiteDetails(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("FROTH_LOGIN_TOKEN"), process.env.AUTOMATION_SUITE_ID);
78
- BUFFER.setItem("FROTHE_SUITE_DETAILS", JSON.stringify(getSuiteDetail.script_details))
79
- process.env.TESTDATA_ID = getSuiteDetail.test_data_id;
80
- return getSuiteDetail;
81
-
82
- } catch (error) {
83
- // console.error('Error in main function:', error);
84
- }
85
- }
86
- async function setTestDataDetails() {
87
- try {
88
- const jsonobject = await getDataById(BUFFER.getItem("ORGANISATION_DOMAIN_URL"), BUFFER.getItem("FROTH_LOGIN_TOKEN"), process.env.TESTDATA_ID);
89
-
90
- } catch (error) {
91
- // console.error('Error in main function:', error);
92
- }
93
- }
94
- module.exports = {
95
- setEnvVariables,
96
- setLoginToken,
97
- setExecutionDetails,
98
- setSuiteDetails,
99
- setTestDataDetails
100
- };
@@ -1,53 +0,0 @@
1
- const deepmerge = require('deepmerge')
2
- const path = require('path');
3
- const commonconfig = require('./commonconfig');
4
- const SUITE_FILE = path.resolve(process.cwd(), process.env.SUITE);
5
- console.log('====>SUITE_FILE:', SUITE_FILE);
6
-
7
-
8
- exports.config = deepmerge(commonconfig, {
9
- user: 'naveen_OSt3Pw',
10
- key: 'B9Rx28MTKFzRJ2QEVK1c',
11
- services: [
12
- [
13
- 'browserstack',
14
- {
15
- browserstackLocal: false,
16
- buildIdentifier: '#${BUILD_NUMBER}',
17
- opts: {
18
- forcelocal: false,
19
- localIdentifier: 'webdriverio-browserstack-repo'
20
- }
21
- },
22
- ],
23
- ],
24
-
25
- capabilities: [
26
- {
27
- browserName: 'chrome',
28
- browserVersion: 'latest',
29
- 'bstack:options': {
30
- buildName: 'browserstack build',
31
- source: 'webdriverio:sample-master:v1.2'
32
- }
33
- },
34
- ],
35
-
36
- updateJob: false,
37
- specs: require(SUITE_FILE).tests,
38
- exclude: [],
39
-
40
- logLevel: 'info',
41
- coloredLogs: true,
42
- screenshotPath: './errorShots/',
43
- baseUrl: '',
44
- waitforTimeout: 10000,
45
- connectionRetryTimeout: 90000,
46
- connectionRetryCount: 3,
47
-
48
- framework: 'mocha',
49
- mochaOpts: {
50
- ui: 'bdd',
51
- timeout: 20000
52
- }
53
- });