webdriverio-community / wdio-html-reporter

Fork of wdio-html-format-reporter
MIT License
18 stars 27 forks source link

no report is generated for cucumber tests #20

Closed pako88 closed 4 years ago

pako88 commented 4 years ago

with mocha framework everythings fine, but no report is generated for cucumber tests. i got following error message:

[0-0] PASSED in chrome - D:\Repos\webdriverio-common\test\features\smoke.feature
(node:18488) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'info' of undefined
    at ReportAggregator.createReport (D:\Repos\webdriverio-common\node_modules\@rpii\wdio-html-reporter\src\reportAggregator.js:117:39)
    at D:\Repos\webdriverio-common\config\shared.conf.ts:422:40
    at Object.onComplete (D:\Repos\webdriverio-common\config\shared.conf.ts:427:7)
    at D:\Repos\webdriverio-common\node_modules\@wdio\cli\build\utils.js:82:13
    at Array.map (<anonymous>)
    at runOnCompleteHook (D:\Repos\webdriverio-common\node_modules\@wdio\cli\build\utils.js:80:37)
    at Launcher.run (D:\Repos\webdriverio-common\node_modules\@wdio\cli\build\launcher.js:78:69)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:18488) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:18488) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

does anyone got this reporter running with cucumber?

rpii commented 4 years ago

typically that error indicates the the report structure did not get built correctly by the proper report events being fired and saving off the data. I havent used it with cucumber.

On Fri, Mar 13, 2020 at 5:40 AM Pascal König notifications@github.com wrote:

with mocha framework everythings fine, but no report is generated for cucumber tests. i got following error message:

[0-0] PASSED in chrome - D:\Repos\webdriverio-common\test\features\smoke.feature (node:18488) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'info' of undefined at ReportAggregator.createReport (D:\Repos\webdriverio-common\node_modules\@rpii\wdio-html-reporter\src\reportAggregator.js:117:39) at D:\Repos\webdriverio-common\config\shared.conf.ts:422:40 at Object.onComplete (D:\Repos\webdriverio-common\config\shared.conf.ts:427:7) at D:\Repos\webdriverio-common\node_modules\@wdio\cli\build\utils.js:82:13 at Array.map () at runOnCompleteHook (D:\Repos\webdriverio-common\node_modules\@wdio\cli\build\utils.js:80:37) at Launcher.run (D:\Repos\webdriverio-common\node_modules\@wdio\cli\build\launcher.js:78:69) at processTicksAndRejections (internal/process/task_queues.js:97:5) (node:18488) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2) (node:18488) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

does anyone got this reporter running with cucumber?

— 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/20, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEABIEIRLFUEDOCEGGECF2TRHISPJANCNFSM4LHBUWAQ .

rpii commented 4 years ago

Ive published a new version that will output some diagnostics in this case. I will need a test case or you can see if the diagnostics shed any light on the issue

Rich

On Fri, Mar 13, 2020 at 5:40 PM Rich Peters gofootn@gmail.com wrote:

typically that error indicates the the report structure did not get built correctly by the proper report events being fired and saving off the data. I havent used it with cucumber.

On Fri, Mar 13, 2020 at 5:40 AM Pascal König notifications@github.com wrote:

with mocha framework everythings fine, but no report is generated for cucumber tests. i got following error message:

[0-0] PASSED in chrome - D:\Repos\webdriverio-common\test\features\smoke.feature (node:18488) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'info' of undefined at ReportAggregator.createReport (D:\Repos\webdriverio-common\node_modules\@rpii\wdio-html-reporter\src\reportAggregator.js:117:39) at D:\Repos\webdriverio-common\config\shared.conf.ts:422:40 at Object.onComplete (D:\Repos\webdriverio-common\config\shared.conf.ts:427:7) at D:\Repos\webdriverio-common\node_modules\@wdio\cli\build\utils.js:82:13 at Array.map () at runOnCompleteHook (D:\Repos\webdriverio-common\node_modules\@wdio\cli\build\utils.js:80:37) at Launcher.run (D:\Repos\webdriverio-common\node_modules\@wdio\cli\build\launcher.js:78:69) at processTicksAndRejections (internal/process/task_queues.js:97:5) (node:18488) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2) (node:18488) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

does anyone got this reporter running with cucumber?

— 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/20, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEABIEIRLFUEDOCEGGECF2TRHISPJANCNFSM4LHBUWAQ .

pako88 commented 4 years ago

with the new version (0.8.8), the tests didn't even start (also in mocha this time)

2020-03-16T06:10:45.596Z ERROR @wdio/config:ConfigParser: Failed loading configuration file: D:\Repos\webdriverio-common\config\local.conf.js: Cannot find module './reporter'

i'll try to set up an example project

pako88 commented 4 years ago

i found the error for version 0.8.6. if there are quotes (") in the scenario description, the result files aren't generated from the reporter...

rpii commented 4 years ago

Could you send me an example and I will look into it?

thanks Rich

On Mon, Mar 16, 2020 at 5:51 AM Pascal König notifications@github.com wrote:

i found the error for version 0.8.6. if there are quotes (") in the scenario description, the result files aren't generated from the reporter...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/rpii/wdio-html-reporter/issues/20#issuecomment-599518727, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEABIEJAP2MTGS3PSYVX543RHYODBANCNFSM4LHBUWAQ .

pako88 commented 4 years ago

https://github.com/pako88/WebdriverIO_v5_TypeScript/blob/html-reporter-with-quotes/package.json#L8

Just run the "test-cucumber" npm script in the branch "html-reporter-with-quotes"

rpii commented 4 years ago

Thanks for the great example. I was able to sort out the issues with cucumber and its working now. Go ahead and try version 1.0.0 and let me know how it works for you. I did make a couple of changes to your sample project.