Closed piyush-ezee closed 3 years ago
I would need some more detailed debug output where it blows up. I dont have anything resembling your setup.
If you have the most recent version set
collapseTests: false,
in the reporter constructor.
On Tue, May 11, 2021 at 10:13 PM piyush-ezee @.***> wrote:
I'm facing an issue in integrating wdio-html-rpeort while I have already setup Browserstack Local and it's successfully running all I want now it generates html report in the local directory but hung after session start.
this is my wdio.config file look like
import { ReportAggregator, HtmlReporter} from @.***/wdio-html-reporter' ; const capabilities = { 'bstack:options': { os: 'Windows', osVersion: '10', debug: 'true', networkLogs: 'true', seleniumVersion: '3.14.0', // other BS config }, browserName: 'Chrome', browserVersion: 'latest', } exports.config = { services: [ ['browserstack', { browserstackLocal: true }], ],
runner: 'local',
specs: [ './main.ts', ], framework: 'mocha', reporters: ['browserstack', 'spec',[HtmlReporter, { debug: true, outputDir: './reports/html-reports/', filename: 'report.html', reportTitle: 'Test Report Title', showInBrowser: true, useOnAfterCommandForScreenshot: false, } ]], reporterOptions: { browserstack: {outputDir: './' }, },
mochaOpts: { ui: 'bdd', require: @.***/register'], timeout: 300000, },
If I remove HTMLReport from reporters it works fine otherwise if hung with the following error
[0-0] 2021-05-12T04:42:47.458Z DEBUG @wdio/browserstack-service: Updating Browserstack session at https://api.browserstack.com/automate/sessions/{SESSION_ID}.json with request body: { name: undefined } [0-0] 2021-05-12T04:42:48.431Z ERROR @wdio/sync: HTTPError: Response code 422 (Unprocessable Entity) at Request. (/home/user/Documents/PROJECT/node_modules/got/dist/source/as-promise/index.js:117:42) at processTicksAndRejections (internal/process/task_queues.js:97:5) [0-0] 2021-05-12T04:42:48.431Z DEBUG @wdio/sync: Finished to run "beforeSuite" hook in 972ms
How can I resolve this?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rpii/wdio-html-reporter/issues/55, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEABIEOUHGM2W2KCG6WYHGDTNIE4HANCNFSM44XZUIRQ .
I have added a log and snapshot of Browsershot of a recent incident And yes I have also tried with collapseTests disabled,it still goes like nowhere and timeout.
BrowserSTack Log
IDE Log
Execution of 1 spec files started at 2021-05-13T03:16:32.717Z
2021-05-13T03:16:32.719Z DEBUG @wdio/utils:initialiseServices: initialise service "browserstack" as NPM package
2021-05-13T03:16:32.727Z INFO @wdio/cli:launcher: Run onPrepare hook
2021-05-13T03:16:36.671Z INFO @wdio/browserstack-service: Browserstack Local successfully started after 3941.690958ms
2021-05-13T03:16:36.671Z DEBUG @wdio/cli:utils: Finished to run "onPrepare" hook in 3943ms
2021-05-13T03:16:36.672Z INFO @wdio/cli:launcher: Run onWorkerStart hook
2021-05-13T03:16:36.672Z DEBUG @wdio/cli:utils: Finished to run "onWorkerStart" hook in 0ms
2021-05-13T03:16:36.673Z INFO @wdio/local-runner: Start worker 0-0 with arg: ez-ds-fe/wdio.conf.js
[0-0] 2021-05-13T03:16:37.050Z INFO @wdio/local-runner: Run worker command: run
[0-0] 2021-05-13T03:16:37.480Z DEBUG @wdio/local-runner:utils: init remote session
[0-0] 2021-05-13T03:16:37.496Z DEBUG @wdio/utils:initialiseServices: initialise service "browserstack" as NPM package
[0-0] 2021-05-13T03:16:37.521Z DEBUG @wdio/sync: Finished to run "beforeSession" hook in 0ms
[0-0] RUNNING in Chrome - /project/test/specs/login.spec.ts
[0-0] 2021-05-13T03:16:40.015Z DEBUG @wdio/local-runner:utils: init remote session
[0-0] 2021-05-13T03:16:40.017Z INFO webdriver: Initiate new session using the WebDriver protocol
[0-0] 2021-05-13T03:16:40.018Z INFO webdriver: [POST] https://hub-cloud.browserstack.com/wd/hub/session
[0-0] 2021-05-13T03:16:40.018Z INFO webdriver: DATA {
capabilities: {
alwaysMatch: {
'bstack:options': [Object],
browserName: 'Chrome',
browserVersion: 'latest',
'browserstack.local': true
},
firstMatch: [ {} ]
},
desiredCapabilities: {
'bstack:options': {
os: 'Windows',
osVersion: '10',
debug: 'true',
networkLogs: 'true',
seleniumVersion: '3.14.0',
userName: '',
accessKey: '',
},
browserName: 'Chrome',
browserVersion: 'latest',
'browserstack.local': true
}
}
[0-0] 2021-05-13T03:16:54.659Z DEBUG @wdio/browserstack-service: Requesting Browserstack session URL at https://api.browserstack.com/automate/sessions/8fac761f1a9bf56736dbf6d349e9d723a3b68686.json
[0-0] 2021-05-13T03:16:55.809Z INFO @wdio/browserstack-service: Windows 10 Chrome latest session: https://automate.browserstack.com/builds/688012f134e41b29e5846ab82a84a477cf9de7f3/sessions/8fac761f1a9bf56736dbf6d349e9d723a3b68686
[0-0] 2021-05-13T03:16:55.809Z DEBUG @wdio/sync: Finished to run "before" hook in 1149ms
[0-0] 2021-05-13T03:16:55.815Z INFO @wdio/browserstack-service: Update job with sessionId 8fac761f1a9bf56736dbf6d349e9d723a3b68686
[0-0] 2021-05-13T03:16:55.815Z DEBUG @wdio/browserstack-service: Updating Browserstack session at https://api.browserstack.com/automate/sessions/8fac761f1a9bf56736dbf6d349e9d723a3b68686.json with request body: { name: undefined }
[0-0] 2021-05-13T03:16:56.656Z ERROR @wdio/sync: HTTPError: Response code 422 (Unprocessable Entity)
at Request.<anonymous> (/home/piyus/Documents/project/node_modules/got/dist/source/as-promise/index.js:117:42)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
[0-0] 2021-05-13T03:16:56.656Z DEBUG @wdio/sync: Finished to run "beforeSuite" hook in 840ms
I would need some more detailed debug output where it blows up. I dont have anything resembling your setup. If you have the most recent version set collapseTests: false, in the reporter constructor. … On Tue, May 11, 2021 at 10:13 PM piyush-ezee @.> wrote: I'm facing an issue in integrating wdio-html-rpeort while I have already setup Browserstack Local and it's successfully running all I want now it generates html report in the local directory but hung after session start. this is my wdio.config file look like import { ReportAggregator, HtmlReporter} from @./wdio-html-reporter' ; const capabilities = { 'bstack:options': { os: 'Windows', osVersion: '10', debug: 'true', networkLogs: 'true', seleniumVersion: '3.14.0', // other BS config }, browserName: 'Chrome', browserVersion: 'latest', } exports.config = { services: [ ['browserstack', { browserstackLocal: true }], ], runner: 'local', specs: [ './main.ts', ], framework: 'mocha', reporters: ['browserstack', 'spec',[HtmlReporter, { debug: true, outputDir: './reports/html-reports/', filename: 'report.html', reportTitle: 'Test Report Title', showInBrowser: true, useOnAfterCommandForScreenshot: false, } ]], reporterOptions: { browserstack: {outputDir: './' }, }, mochaOpts: { ui: 'bdd', require: @.**/register'], timeout: 300000, }, If I remove HTMLReport from reporters it works fine otherwise if hung with the following error [0-0] 2021-05-12T04:42:47.458Z DEBUG @wdio/browserstack-service: Updating Browserstack session at https://api.browserstack.com/automate/sessions/{SESSION_ID}.json with request body: { name: undefined } [0-0] 2021-05-12T04:42:48.431Z ERROR @wdio/sync: HTTPError: Response code 422 (Unprocessable Entity) at Request. (/home/user/Documents/PROJECT/node_modules/got/dist/source/as-promise/index.js:117:42) at processTicksAndRejections (internal/process/task_queues.js:97:5) [0-0] 2021-05-12T04:42:48.431Z DEBUG @wdio/sync: Finished to run "beforeSuite" hook in 972ms How can I resolve this?* — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#55>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEABIEOUHGM2W2KCG6WYHGDTNIE4HANCNFSM44XZUIRQ .
Hi @rpii, have you tried this or any idea about this?
HI,
I am pretty busy right now. I did look at it but there is not enough context to see anything. I would recommend running a debugger on your test and see it you can get closer to where it fails.
On Tue, May 18, 2021 at 8:14 PM piyush-ezee @.***> wrote:
Hi @rpii https://github.com/rpii, have you tried this or any idea about this?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rpii/wdio-html-reporter/issues/55#issuecomment-843710734, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEABIEOU3JF5672X572BGALTOMUHLANCNFSM44XZUIRQ .
Make it to work by a non-npm local plugin.
I'm facing an issue in integrating wdio-html-rpeort while I have already setup Browserstack Local and it's successfully running all I want now it generates html report in the local directory but hung after session start.
this is my wdio.config file look like
If I remove HTMLReport from reporters it works fine otherwise if hung with the following error
[0-0] 2021-05-12T04:42:47.458Z DEBUG @wdio/browserstack-service: Updating Browserstack session at https://api.browserstack.com/automate/sessions/{SESSION_ID}.json with request body: { name: undefined } [0-0] 2021-05-12T04:42:48.431Z ERROR @wdio/sync: HTTPError: Response code 422 (Unprocessable Entity) at Request. (/home/user/Documents/PROJECT/node_modules/got/dist/source/as-promise/index.js:117:42)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
[0-0] 2021-05-12T04:42:48.431Z DEBUG @wdio/sync: Finished to run "beforeSuite" hook in 972ms
How can I resolve this?