Skip to main content
Automation – Granular Videos for Apps

How to configure video recordings from a test script.

Doris Sooläte avatar
Written by Doris Sooläte
Updated over 3 weeks ago

The platform does not produce granular recording for each test case by default. To enable it, you have to configure it from the test script.

Node (WebdriverIO, Mockito)

With WebdriverIO the recommended package to generate granular videos is wdio-video-reporter.

To install this package run:

npm install wdio-video-reporter

Once the package is installed in your project, configure webdriverio. In your project config file (for example wdio.conf.js), take these steps:

  1. Import the package:

import videoReporter from 'wdio-video-reporter';

2. In the reporters section add your configuration:

reporters: [
[
videoReporter,
{
saveAllVideos: true,
videoSlowdownMultiplier: 10,
outputDir: <allureResultsDir>
}
],
[
'allure',
{
// allure options
}
]
],

Configuration

Field

Type

Comment

saveAllVideos

boolean

true: generates a video for every test
false: generates a video just for the failing tests

outputDir

string

needs to point to the allure results folder in order for the videos to be found and properly processed

videoSlowdownMultiplier

number

the higher the number the slower the video play (assigns more duration to every screenshot in the video)

Further configuration details can be found in the WebdriverIO documentation.

Note: Be aware that wdio-video-reporter takes screenshots that are displayed together to create the video. By default, a screenshot is grabbed after every action.


Did this answer your question?