webdriverio-community / wdio-video-reporter

Reporter for WebdriverIO that makes videos of failed tests and has optional allure integration

Home Page:https://webdriver.io/docs/wdio-video-reporter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bypass screenshots when the video reporter is enabled

miguelofbc opened this issue · comments

Is your feature request related to a problem? Please describe.
Looking into the cons under https://webdriver.io/docs/wdio-video-reporter/ as follows, the test cases are getting slower by enabling this feature.

Cons:
Works by taking screenshots after "actions", which makes the tests a little bit slower. This is mitigated by carefully choosing which jsonWireProtocol messages that should result in a screenshot

Describe the solution you'd like
The preferred solution would be to have a way to bypass the screenshots when the video reporter is enabled.

Describe alternatives you've considered
Having a way to disable the video reporter for normal executions, like a configuration attribute that could be set while running locally. For regular runs, the video reporter would be disabled, and we would use screenshots instead.

Other options
Having usage examples of addExcludedActions?

The preferred solution would be to have a way to bypass the screenshots when the video reporter is enabled.

There is no other way to generate the video.

Having a way to disable the video reporter for normal executions

The wdio.conf.js is a normal JS file that can read parameters or environment variables. Based on them you can add the reporter as you like, e.g.:

if (process.env.ENABLE_WDIO_VIDEO_REPORTER) {
    config.reporters.push('video')
}

Closing. Let me know if you have further questions.

Thanks for the quick feedback @christian-bromann! 🙏