wdio-video-reporter
wdio-video-reporter copied to clipboard
Construct videos earlier and provide paths to attach to other reporters
Is your feature request related to a problem? Please describe.
I want to be able to send the created video to ReportPortal, etc. Since all videos are constructed in onRunnerEnd
the only place we can do this is onComplete
which is kind of late.
Describe the solution you'd like
I want to have access to the last created video path as well as access to file in afterScenario
.
Describe alternatives you've considered I have created a workaround storing values in JSON files but not 100% sure this will work.
Additional context None at the current time.
When using this with wdio-reportportal-reporter/service
I see lots of weird timing issues. :-(
Toying with the idea of converting this to a service to fit my needs. I will let you know what I find. It does kind of make sense as a service IMO as it isn't generating a reporter but a service that is collecting further data points.
@mikesalvia
Actually the video generation starts at each onTestEnd
https://github.com/webdriverio-community/wdio-video-reporter/blob/main/src/index.js#L176
The problem with videos is that it takes a different amount of time to generate each video and write it to the hdd, so what you see at onRunnerEnd
and onExit
are functions that forces the selenium runner to stay open while videos are still being written to disk, as we had a bug previously where some videos were cut off in the middle.
What you can do is halt each test until its video is ready by using helpers.waitForVideosToExist, my guess is that it would slow down overall test-execution, which is why we wait for videos at the end, but it is possible.
Describe the solution you'd like I want to have access to the last created video path as well as access to file in afterScenario.
You have access to the path in onTestEnd
Check:
https://github.com/webdriverio-community/wdio-video-reporter/blob/main/src/helpers.js#L56
which is called from:
https://github.com/webdriverio-community/wdio-video-reporter/blob/main/src/index.js#L176
Thanks I will look into this.
Closed thank you for the help!