Closed gavrilenkokate closed 3 years ago
getting the following exception while running with wdio v6.
(node:79481) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'createReport' of undefined
at /Users/Rahul/Documents/GitHub/CloudIO-Automation-Suite/SetupPages/wdio.conf.js:292:37
at Object.onComplete (/Users/Rahul/Documents/GitHub/CloudIO-Automation-Suite/SetupPages/wdio.conf.js:293:7)
at Promise.all.onCompleteHook.map (/Users/Rahul/Documents/GitHub/CloudIO-Automation-Suite/SetupPages/node_modules/@wdio/cli/build/utils.js:109:13)
at Array.map (<anonymous>)
at runOnCompleteHook (/Users/Rahul/Documents/GitHub/CloudIO-Automation-Suite/SetupPages/node_modules/@wdio/cli/build/utils.js:107:37)
at Launcher.run (/Users/Rahul/Documents/GitHub/CloudIO-Automation-Suite/SetupPages/node_modules/@wdio/cli/build/launcher.js:83:69)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:79481) 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(). (rejection id: 1)
(node:79481) [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.
make sure the suggested in on prepare is executing:
onPrepare: function (config, capabilities) {
let reportAggregator = new ReportAggregator({
outputDir: './reports/html-reports/',
filename: 'master-report.html',
reportTitle: 'Master Report',
LOG: logger,
showInBrowser: true
});
reportAggregator.clean() ;
global.reportAggregator = reportAggregator;
},
On Thu, Sep 24, 2020 at 6:58 AM Rahul Chavan notifications@github.com wrote:
getting the following exception while running with wdio v6.
(node:79481) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'createReport' of undefined at /Users/Rahul/Documents/GitHub/CloudIO-Automation-Suite/SetupPages/wdio.conf.js:292:37 at Object.onComplete (/Users/Rahul/Documents/GitHub/CloudIO-Automation-Suite/SetupPages/wdio.conf.js:293:7) at Promise.all.onCompleteHook.map (/Users/Rahul/Documents/GitHub/CloudIO-Automation-Suite/SetupPages/node_modules/@wdio/cli/build/utils.js:109:13) at Array.map (
) at runOnCompleteHook (/Users/Rahul/Documents/GitHub/CloudIO-Automation-Suite/SetupPages/node_modules/@wdio/cli/build/utils.js:107:37) at Launcher.run (/Users/Rahul/Documents/GitHub/CloudIO-Automation-Suite/SetupPages/node_modules/@wdio/cli/build/launcher.js:83:69) at process._tickCallback (internal/process/next_tick.js:68:7) (node:79481) 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(). (rejection id: 1) (node:79481) [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. — 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/29#issuecomment-698362021, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEABIEPZ6D7E6N7V3GYDBEDSHNF6ZANCNFSM4MNMSKYQ .
No response, closing
`
Config of WebdriverIO `const {ReportAggregator, HtmlReporter} = require('@rpii/wdio-html-reporter'); //const log4j = require('log4js');
exports.config = { // // ==================== // Runner Configuration // ==================== // // WebdriverIO allows it to run your tests in arbitrary locations (e.g. locally or // on a remote machine). runner: 'local', // // ================== // Specify Test Files // ================== // Define which test specs should run. The pattern is relative to the directory // from which
wdio
was called. Notice that, if you are callingwdio
from an // NPM script (see https://docs.npmjs.com/cli/run-script) then the current working // directory is where your package.json resides, sowdio
will be called from there. // specs: [ './test/specs/*/.js' ], suites: {} ` Describe the bug Master report is not generating for all suites with HTML REPORTER (WDIO6). I'm getting a bunch of HTML reports for each spec file. found this issues reported on stackoverflow.com: https://stackoverflow.com/questions/57622119/master-report-is-not-generating-for-all-suites-with-html-reporter-wdio5