webdriverio-community/wdio-html-reporter

Report Not Aggreating Properly Due to Test Suites Issue

Opened this issue · 8 comments

Locally working correctly. But If I run on Remote selenium hub all tests gets executed but report is not generated if there many test steps (more than 20).

Throws Error while aggregating report.

INFO @wdio/cli:launcher: Run onComplete hook
SyntaxError: Unexpected end of JSON input
at JSON.parse ()
at ReportAggregator.createReport (/opt/node_modules/@rpii/wdio-html-reporter/src/reportAggregator.js:89:35)
at /opt/wdio1635406367463.config.js:1:2032
at Object.onComplete (/opt/wdio1635406367463.config.js:1:2274)
at Promise.all.onCompleteHook.map (/opt/node_modules/@wdio/cli/build/utils.js:67:19)
at Array.map ()
at Object.runOnCompleteHook (/opt/node_modules/@wdio/cli/build/utils.js:65:39)
at Launcher.run (/opt/node_modules/@wdio/cli/build/launcher.js:64:53)
at process._tickCallback (internal/process/next_tick.js:68:7)

image

rpii commented
rpii commented

Thank you the Inputs.
I am facing one more problem , On afterTest taking screenshots browser.saveScreenshot(filepath).
Screenshots size is of more than 700KB. Please help me how to decrease the size while saving screenshots , after each test execution.

rpii commented
rpii commented

I made a change to save screenshots as links to a relative file instead of encoding base64. Can you try this and see if it fixes your issue. having problem pushing to github but I will publish to npm shortly

Locally working correctly. But If I run on Remote selenium hub all tests gets executed but report is not generated if there many test steps (more than 20).

Throws Error while aggregating report.

INFO @wdio/cli:launcher: Run onComplete hook SyntaxError: Unexpected end of JSON input at JSON.parse () at ReportAggregator.createReport (/opt/node_modules/@rpii/wdio-html-reporter/src/reportAggregator.js:89:35) at /opt/wdio1635406367463.config.js:1:2032 at Object.onComplete (/opt/wdio1635406367463.config.js:1:2274) at Promise.all.onCompleteHook.map (/opt/node_modules/@wdio/cli/build/utils.js:67:19) at Array.map () at Object.runOnCompleteHook (/opt/node_modules/@wdio/cli/build/utils.js:65:39) at Launcher.run (/opt/node_modules/@wdio/cli/build/launcher.js:64:53) at process._tickCallback (internal/process/next_tick.js:68:7)

image

Hi I am also facing same issue, how to resolve this error

it looks like in the latest version removeOutput defaults to true. can you look in the json files and see if the test blocks have data in the output propert? thanks

On Thu, Oct 28, 2021 at 2:57 PM Rich Peters @.> wrote: There is some kind of memory limit on the size of the individual json objects that get generated. Are you setting the property removeOutput to true on the reportAggregator? that may help Rich On Thu, Oct 28, 2021 at 1:08 AM Neeraja-Reddy-1 @.> wrote: > Locally working correctly. But If I run on Remote selenium hub all tests > gets executed but report is not generated if there many test steps (more > than 20). > > Throws Error while aggregating report. > > INFO @wdio/cli:launcher: Run onComplete hook > SyntaxError: Unexpected end of JSON input > at JSON.parse () > at ReportAggregator.createReport > @./wdio-html-reporter/src/reportAggregator.js:89:35) > at /opt/wdio1635406367463.config.js:1:2032 > at Object.onComplete (/opt/wdio1635406367463.config.js:1:2274) > at Promise.all.onCompleteHook.map > @./cli/build/utils.js:67:19) > at Array.map () > at Object.runOnCompleteHook > @./cli/build/utils.js:65:39) > at Launcher.run @./cli/build/launcher.js:64:53) > at process._tickCallback (internal/process/next_tick.js:68:7) > > [image: image] > https://user-images.githubusercontent.com/93314191/139213409-75099a4c-a879-48bc-aaf6-d276bb8e5720.png > > — > You are receiving this because you are subscribed to this thread. > Reply to this email directly, view it on GitHub > <#75>, or unsubscribe > https://github.com/notifications/unsubscribe-auth/AEABIEMF6PTGB5R2FS2ZJ2LUJEAEJANCNFSM5G4G73VA > . > Triage notifications on the go with GitHub Mobile for iOS > https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 > or Android > https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. > >

Hi, I am also facing the same issue ,how to resolve this issue and could you please help me

rpii commented