wdio-video-reporter is a 3rd party package, for more information please see GitHub | npm

Create a video screen capture of your tests and enhanced your Allure reporting easily!
This is a WebdriverIO reporter that generates videos of your test executions. If you use it in combination with the Allure Reporter, then the test cases automatically get decorated with the videos as well (see example project).
As this reporter is using the saveScreenshot command to render the video it supports all environments including mobile environments.
That said, taking a screenshot after almost every command can slow down your tests. Also, note that the videos don't include alert-boxes and popups.
Installation
First, install the reporter:
npm install --save-dev wdio-video-reporter
or
yarn add --dev wdio-video-reporter
Then add the reporter to your configuration:
reporters: [
['video', {
saveAllVideos: false, // If true, also saves videos for successful test cases
videoSlowdownMultiplier: 3, // Higher to get slower videos, lower for faster videos [Value 1-100]
}],
],
Usage
With Allure Reporter
Adding the Allure reporter as well automatically updates the reports with videos without any need to configure anything :-)
reporters: [
['video', {
saveAllVideos: false, // If true, also saves videos for successful test cases
videoSlowdownMultiplier: 3, // Higher to get slower videos, lower for faster videos [Value 1-100]
}],
['allure', {
outputDir: './_results_/allure-raw',
disableWebdriverStepsReporting: true,
disableWebdriverScreenshotsReporting: true,
}],
],
With wdio-html-nice-reporter
Adding the html nice reporter automatically updates the reports with videos without any need to configure anything 🙂
reporters: [
['video', {
saveAllVideos: false, // If true, also saves videos for successful test cases
videoSlowdownMultiplier: 3, // Higher to get slower videos, lower for faster videos [Value 1-100]
outputDir: './reports/html-reports/',
}],
['html-nice', {
outputDir: './reports/html-reports/',
filename: 'report.html',
reportTitle: 'Test Report Title',
linkScreenshots: true,
//to show the report in a browser when done
showInBrowser: true,
collapseTests: false,
//to turn on screenshots after every test must be false to use video
useOnAfterCommandForScreenshot: false,
}],
],
Configuration
Most users may want to set these configurations:
saveAllVideos
Set to true to save videos for passing tests.
Type: boolean
Default: false
rawPath
Where to save the screenshots for the video.
Type: string
Default: .video-reporter-screenshots
filenamePrefixSource
Prefix for video filenames by either suite or test name. When using cucumber it will always be suite.
Type: 'suite' | 'test'
Default: test
videoSlowdownMultiplier
Integer between [1-100]. Increase if videos are playing to quick.
Type: number
Default: 3
videoScale
Scaling of video. See https://trac.ffmpeg.org/wiki/Scaling.
Type: string
Default: '1200:trunc(ow/a/2)*2'
videoRenderTimeout
Maximum time to wait for a video to finish rendering (in ms).
Type: number
Default: 5000
outputDir
If it's not set, it uses outputDir.
Type: string