wdio-video-reporter is a 3rd party package, for more information please see GitHub | npm
This is a reporter for Webdriver IO v6 and highr that generates videos of your wdio test executions. If you use allure, then the test cases automatically get decorated with the videos as well. (For Webdriver IO v5, please use wdio-video-reporter version ^2.0.0.)
Videos ends up in wdio.config.outputDir
Checkout example Allure report with included videos on failed tests here: https://presidenten.github.io/wdio-video-reporter-example-report/
Pros:
- Nice videos in your allure reports
- Nice human speed videos, even though tests are fast
- Works with Selenium grid
- Works with all webdrivers that support
saveScreenshot
- Verified on the following Deskop browsers using Selenium 3.141.59:
- Chrome
- Firefox
- Safari
- Internet Explorer 11
- Microsoft Edge
- Verified on the following ios and android devices with Appium 1.13.0-beta3:
- Iphone 8
- Ipad Gen 6
- Samsung galaxy S9
- Samsung galaxy tab A10
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
- Selenium drivers doesn't include alert-boxes and popups in screenshots, so they are not visible in the videos
Quick start
Checkout the simple template at wdio-template to quickly get up to speed.
Clone one of the repositories and install dependencies with yarn
or npm install
. Then run yarn e2e
or npm run e2e
in demo directory and finally yarn report
or npm run report
to see allure report.
Installation
Install the reporter
yarn add wdio-video-reporter
or
npm install wdio-video-reporter
Add the reporter to config
At the top of the wdio.conf.js
-file, require the library:
const video = require('wdio-video-reporter');
Then add the video reporter to the configuration in the reporters property:
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]
}],
],
Using with Allure
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,
}],
],