webdriverio-community / wdio-video-reporter

Reporter for WebdriverIO that makes videos of failed tests and has optional allure integration
https://webdriver.io/docs/wdio-video-reporter
MIT License
58 stars 47 forks source link

Observing "Cannot read property 'filter' of undefined" after adding video to reporters object #73

Closed bkapadia01 closed 2 years ago

bkapadia01 commented 2 years ago

Describe the bug After adding the video reporter to my wdio conf file the test do not run and I am faced with the following error. ERROR @wdio/local-runner: Failed launching test session: TypeError: Cannot read property 'filter' of undefined

We are using running test on both an iOS app and on a website. We have successfully added alurre reporter and cucumber to our framework and working as expected. The current implementation for reporter in our wdio.conf.ts file is as follows:

    'spec',
    [video, {
      saveAllVideos: false,       // If true, also saves videos for successful test cases
      videoSlowdownMultiplier: 1, // Higher to get slower videos, lower for faster videos [Value 1-100]
    }],
    ['allure', {
      outputDir: '_results_/allure-raw',
      disableWebdriverStepsReporting: true,
      disableWebdriverScreenshotsReporting: true,
      useCucumberStepReporter: true
    }],
  ],

Log Please set wdio.config.logLevel = 'debug', then post the whole file called wdio-0-0-video-reporter.log. If it is very large, consider using a gist - http://gist.github.com. no wdio-0-0-video-reporter log outputted but

[0-0]     at Video.onRunnerStart (/Users/username/dev/e2e-test-automation/node_modules/wdio-video-reporter/src/index.js:67:51)
[0-0]     at Video.<anonymous> (/Users/username/dev/e2e-test-automation/node_modules/@wdio/reporter/build/index.js:59:18)
[0-0]     at Video.emit (events.js:400:28)
[0-0]     at Video.emit (domain.js:470:12)
[0-0]     at /Users/username/dev/e2e-test-automation/node_modules/@wdio/runner/build/reporter.js:36:56
[0-0]     at Array.forEach (<anonymous>)
[0-0]     at BaseReporter.emit (/Users/username/dev/e2e-test-automation/node_modules/@wdio/runner/build/reporter.js:36:25)
[0-0]     at Runner.run (/Users/username/dev/e2e-test-automation/node_modules/@wdio/runner/build/index.js:113:24)
[0-0]     at processTicksAndRejections (internal/process/task_queues.js:95:5)

Expected behavior Should not observe filter error after adding Environment (please complete the following information):

Desktop (please complete the following information):

Smartphone (please complete the following information):

ajitesh11 commented 2 years ago

@bkapadia01 Please check again now with latest version. This should be fixed as part of https://github.com/webdriverio-community/wdio-video-reporter/pull/72

christian-bromann commented 2 years ago

Thanks for taking a stab at it @ajitesh11 .. will close for now but happy to re-open in case something is still incorrect.