froth-webdriverio-framework 6.0.59 → 6.0.60

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,21 +1,20 @@
1
1
 
2
- //const commonHooks = require('../commonhook');
2
+ const commonHooks = require('../commonhook');
3
3
  const setAllDetails = require('../setallDatailinBuffer');
4
4
 
5
- (async () => {
6
- //setAllDetails.setEnvVariables();
7
- const getExeDetails = await setAllDetails.setExecutionDetails();
8
- // console.log("app url in prerequisite;" + getExeDetails.app_url)
9
- const appurl = process.env.BROWSERSTACK_APP_PATH || getExeDetails.app_url
10
- console.log("app utl is" + appurl)
11
- // getExeDetails.app_url=process.env.BROWSERSTACK_APP_PATH
12
- //return appurl
13
- })();
5
+ // (async () => {
6
+ // //setAllDetails.setEnvVariables();
7
+ // const getExeDetails = await setAllDetails.setExecutionDetails();
8
+ // // console.log("app url in prerequisite;" + getExeDetails.app_url)
9
+ // const appurl = process.env.BROWSERSTACK_APP_PATH || getExeDetails.app_url
10
+ // console.log("app utl is" + appurl)
11
+ // // getExeDetails.app_url=process.env.BROWSERSTACK_APP_PATH
12
+ // //return appurl
13
+ // })();
14
14
 
15
15
  module.exports = (bsCaps) => ({
16
- // const appPath = process.env.BROWSERSTACK_APP_PATH;
17
-
18
- //...commonHooks,
16
+
17
+ ...commonHooks,
19
18
  user: bsCaps.userName,
20
19
  key: Buffer.from(bsCaps.accessKey, 'base64').toString('utf-8'),
21
20
 
@@ -29,7 +28,7 @@ module.exports = (bsCaps) => ({
29
28
  forcelocal: false,
30
29
  localIdentifier: `wdio-${process.pid}`,
31
30
  },
32
- app: process.env.BROWSERSTACK_APP_PATH,
31
+ // app: process.env.BROWSERSTACK_APP_PATH,
33
32
  },
34
33
  ],
35
34
  ],
@@ -37,7 +36,6 @@ module.exports = (bsCaps) => ({
37
36
 
38
37
  capabilities: [{
39
38
  platformName: bsCaps.platformName || 'Android',
40
- //'appium:app': appPath,
41
39
  'bstack:options': {
42
40
  projectName: 'BrowserStack Samples',
43
41
  buildName: 'browserstack build',
@@ -15,28 +15,36 @@ module.exports = {
15
15
 
16
16
  beforeSession: async function (config, capabilities, specs) {
17
17
  try {
18
- if (config.services) {
19
- const bsService = config.services.find(
20
- s => Array.isArray(s) && s[0] === 'browserstack'
21
- );
22
-
23
- // if (bsService) {
24
- // bsService[1].app = process.env.BROWSERSTACK_APP_PATH
25
- // // bsService[1].browserstackLocal = isLocal;
26
-
27
- // if (isLocal) {
28
- // bsService[1].opts = bsService[1].opts || {};
29
- // bsService[1].opts.forcelocal = true;
30
- // bsService[1].opts.localIdentifier = `wdio-${process.pid}`;
31
- // }
32
-
33
- // console.log(`✅ BrowserStack Local: ${bsService[1].browserstackLocal}`);
34
- console.log(`✅ App Path: ${bsService[1].app}`);
35
- console.log("config details " + JSON.stringify(config))
36
- console.log("Capability details " + JSON.stringify(capabilities))
37
-
38
- // }
18
+ console.log("inside before session")
19
+ if (capabilities['bstack:options']) {
20
+ console.log("inside before session if block")
21
+
22
+ capabilities['bstack:options'].app = process.env.BROWSERSTACK_APP_PATH;
39
23
  }
24
+ capabilities['appium:app']=process.env.BROWSERSTACK_APP_PATH;
25
+ console.log('final cinfig dteials :'+JSON.stringify(capabilities))
26
+ // if (config.services) {
27
+ // const bsService = config.services.find(
28
+ // s => Array.isArray(s) && s[0] === 'browserstack'
29
+ // );
30
+
31
+ // if (bsService) {
32
+ // bsService[1].app = process.env.BROWSERSTACK_APP_PATH
33
+ // // bsService[1].browserstackLocal = isLocal;
34
+
35
+ // if (isLocal) {
36
+ // bsService[1].opts = bsService[1].opts || {};
37
+ // bsService[1].opts.forcelocal = true;
38
+ // bsService[1].opts.localIdentifier = `wdio-${process.pid}`;
39
+ // }
40
+
41
+ // console.log(`✅ BrowserStack Local: ${bsService[1].browserstackLocal}`);
42
+ // console.log(`✅ App Path: ${bsService[1].app}`);
43
+ console.log("config details " + JSON.stringify(config))
44
+ // console.log("Capability details " + JSON.stringify(capabilities))
45
+
46
+ // }
47
+ // }
40
48
 
41
49
  } catch (error) {
42
50
  console.error('🚨 Error in beforeSession:', error);
@@ -2,12 +2,12 @@ const getLoginToken = require("../froth_api_calls/loginapi");
2
2
  const exeDetails = require("../froth_api_calls/getexecutionDetails")
3
3
  const getSuiteDetails = require("../froth_api_calls/getsuiteDetails");
4
4
  const getDataById = require("../froth_api_calls/readTestdata");
5
- BUFFER.setItem("FROTH_TOTAL_DURATION", 0);
6
- BUFFER.setItem("FROTH_EXECUTION_ID", process.env.EXECUTION_ID || 1);
7
- BUFFER.setItem("ORGANISATION_DOMAIN_URL", process.env.ORGANISATION_DOMAIN_URL || "https://devapi.frothtestops.com");
8
- BUFFER.setItem("FROTH_LOGIN_TOKEN", process.env.API_TOKEN)
9
- console.log("api token in set evn variable :" + BUFFER.getItem("FROTH_LOGIN_TOKEN"))
10
- console.log("CICD_RUN_ID in set evn variable :" + process.env.CICD_RUN_ID)
5
+ // BUFFER.setItem("FROTH_TOTAL_DURATION", 0);
6
+ // BUFFER.setItem("FROTH_EXECUTION_ID", process.env.EXECUTION_ID || 1);
7
+ // BUFFER.setItem("ORGANISATION_DOMAIN_URL", process.env.ORGANISATION_DOMAIN_URL || "https://devapi.frothtestops.com");
8
+ // BUFFER.setItem("FROTH_LOGIN_TOKEN", process.env.API_TOKEN)
9
+ // console.log("api token in set evn variable :" + BUFFER.getItem("FROTH_LOGIN_TOKEN"))
10
+ // console.log("CICD_RUN_ID in set evn variable :" + process.env.CICD_RUN_ID)
11
11
  async function generateBuildNumber() {
12
12
  try {
13
13
  const now = await new Date();
package/local.log CHANGED
Binary file
@@ -4199,5 +4199,165 @@
4199
4199
  "success": true,
4200
4200
  "failure": null,
4201
4201
  "worker": 28583
4202
+ },
4203
+ {
4204
+ "name": "sdk:testhub",
4205
+ "entryType": "measure",
4206
+ "startTime": 785.9207619987428,
4207
+ "duration": 1471.4553369991481,
4208
+ "detail": null,
4209
+ "success": true,
4210
+ "failure": null,
4211
+ "worker": 30512
4212
+ },
4213
+ {
4214
+ "name": "sdk:percy",
4215
+ "entryType": "measure",
4216
+ "startTime": 2262.6817959994078,
4217
+ "duration": 0.40112699940800667,
4218
+ "detail": null,
4219
+ "success": true,
4220
+ "failure": null,
4221
+ "worker": 30512
4222
+ },
4223
+ {
4224
+ "name": "sdk:automate:local",
4225
+ "entryType": "measure",
4226
+ "startTime": 2263.3464329987764,
4227
+ "duration": 0.4129349999129772,
4228
+ "detail": null,
4229
+ "success": true,
4230
+ "failure": null,
4231
+ "worker": 30512
4232
+ },
4233
+ {
4234
+ "name": "sdk:automate:hub-management",
4235
+ "entryType": "measure",
4236
+ "startTime": 4197.805058997124,
4237
+ "duration": 3059.4516150020063,
4238
+ "detail": null,
4239
+ "success": true,
4240
+ "failure": null,
4241
+ "worker": 30512
4242
+ },
4243
+ {
4244
+ "name": "sdk:testhub",
4245
+ "entryType": "measure",
4246
+ "startTime": 581.9184140004218,
4247
+ "duration": 1263.2674529999495,
4248
+ "detail": null,
4249
+ "success": true,
4250
+ "failure": null,
4251
+ "worker": 31621
4252
+ },
4253
+ {
4254
+ "name": "sdk:percy",
4255
+ "entryType": "measure",
4256
+ "startTime": 1850.2231080010533,
4257
+ "duration": 0.7777110002934933,
4258
+ "detail": null,
4259
+ "success": true,
4260
+ "failure": null,
4261
+ "worker": 31621
4262
+ },
4263
+ {
4264
+ "name": "sdk:automate:local",
4265
+ "entryType": "measure",
4266
+ "startTime": 1851.6157990023494,
4267
+ "duration": 0.708296999335289,
4268
+ "detail": null,
4269
+ "success": true,
4270
+ "failure": null,
4271
+ "worker": 31621
4272
+ },
4273
+ {
4274
+ "name": "sdk:automate:hub-management",
4275
+ "entryType": "measure",
4276
+ "startTime": 4160.544152002782,
4277
+ "duration": 2084.566332999617,
4278
+ "detail": null,
4279
+ "success": true,
4280
+ "failure": null,
4281
+ "worker": 31621
4282
+ },
4283
+ {
4284
+ "name": "sdk:testhub",
4285
+ "entryType": "measure",
4286
+ "startTime": 552.6423059999943,
4287
+ "duration": 834.69974200055,
4288
+ "detail": null,
4289
+ "success": true,
4290
+ "failure": null,
4291
+ "worker": 33019
4292
+ },
4293
+ {
4294
+ "name": "sdk:percy",
4295
+ "entryType": "measure",
4296
+ "startTime": 1392.084923002869,
4297
+ "duration": 0.32989799976348877,
4298
+ "detail": null,
4299
+ "success": true,
4300
+ "failure": null,
4301
+ "worker": 33019
4302
+ },
4303
+ {
4304
+ "name": "sdk:automate:local",
4305
+ "entryType": "measure",
4306
+ "startTime": 1392.6695189997554,
4307
+ "duration": 0.32384100183844566,
4308
+ "detail": null,
4309
+ "success": true,
4310
+ "failure": null,
4311
+ "worker": 33019
4312
+ },
4313
+ {
4314
+ "name": "sdk:automate:hub-management",
4315
+ "entryType": "measure",
4316
+ "startTime": 3018.5993280000985,
4317
+ "duration": 2356.136266000569,
4318
+ "detail": null,
4319
+ "success": true,
4320
+ "failure": null,
4321
+ "worker": 33019
4322
+ },
4323
+ {
4324
+ "name": "sdk:testhub",
4325
+ "entryType": "measure",
4326
+ "startTime": 594.0309510007501,
4327
+ "duration": 1510.122020997107,
4328
+ "detail": null,
4329
+ "success": true,
4330
+ "failure": null,
4331
+ "worker": 35566
4332
+ },
4333
+ {
4334
+ "name": "sdk:percy",
4335
+ "entryType": "measure",
4336
+ "startTime": 2109.655063997954,
4337
+ "duration": 0.3542940020561218,
4338
+ "detail": null,
4339
+ "success": true,
4340
+ "failure": null,
4341
+ "worker": 35566
4342
+ },
4343
+ {
4344
+ "name": "sdk:automate:local",
4345
+ "entryType": "measure",
4346
+ "startTime": 2110.571870997548,
4347
+ "duration": 0.7331540025770664,
4348
+ "detail": null,
4349
+ "success": true,
4350
+ "failure": null,
4351
+ "worker": 35566
4352
+ },
4353
+ {
4354
+ "name": "sdk:automate:hub-management",
4355
+ "entryType": "measure",
4356
+ "startTime": 3980.2775890007615,
4357
+ "duration": 2338.6498649977148,
4358
+ "detail": null,
4359
+ "success": true,
4360
+ "failure": null,
4361
+ "worker": 35566
4202
4362
  }
4203
4363
  ]