-
Notifications
You must be signed in to change notification settings - Fork 11
Test Recording
A video or gif recording of your test execution shows you how it navigates the tests you designed and visually look into eventual errors. This allows you to review your tests in action and uncover areas that may need some improvement.
This feature can be enabled by using gif.enableFilming=true
or video.enableFilming=true
.
Note: If you enable video recording, make sure to review the following basics: ▪ There is one recording per testcase saved as .mp4 or .gif ▪ Neodymium records the entire viewport of the browser that executes your tests. ▪ Consider your disk space. If you run hundreds of TestCases on one machine, this machine must have enough disk space to store the recordings. Keep in mind that each recording is stored inside the defined folder and if enabled inside the allure report as well!
In our example test suites, gif recording is enabled by default.
To use recording we have added the following files to the config
directory:
config/video-recording.properties
config/gif-recording.properties
In each one of them define the properties as you desire the recording. A full list of the properties and what they do is to be found at the bottom of this page.
To properly use video recording it is required to have ffmpeg installed, gif recording works out of the box.
The recording will be added to the allure report automatically. This can be disabled using the property video.appendAllRecordingsToAllureReport=false
or gif.appendAllRecordingsToAllureReport=false
.
All properties start with video.
or gif.
prefix depending on the format you are configuring.
Property | where to use | Format | Description |
---|---|---|---|
enableFilming | gif & video | bool | To be set, to enable recording, if false all other recording properties are ignored |
filmAutomatically | gif & video | bool | Defines, if recording starts automatically when browser is opened or recording needs to be started manually in the code. |
deleteRecordingsAfterAddingToAllureReport | gif & video | bool | Deletes recording in recording folder after adding to allure report to save space |
appendAllRecordingsToAllureReport | gif & video | bool | Defines whether the recordings are added to the report, For false only failures are added. |
oneImagePerMilliseconds | gif & video | Int | Defines the time interval in milliseconds in which the photos for the recordings are taken (needs to be greater than 0) |
tempFolderToStoreRecording | gif & video | String | Defines the directory location where the recordings are saved |
imageQuality | gif & video | double | Defines the value of the desired image quality percentage (value range: 0 imageQuality |
imageScaleFactor | gif & video | doublr | defines the scale factor of the image (value range: 0 imageScaleFactor |
format | gif & video | String | defines the recording format: mp4 or gif
|
logInformationAboutRecording | gif & video | boolean | adds additional debug data about the video processing to the allure report |
video.ffmpegBinaryPath | video | String | defines the path to the ffmpeg program |
video.ffmpegLogFile` | video | String | defines the path where the logfile is saved |
gif.loop | gif | bool | Defines to repeat recording by themselves after finish |
If not configured otherwise the recording is starting automatically as soon as the browser opens and finishes once the test is done. If however only a specific part of each test should be filmed. For example if there are some warm up actions, which should be excluded, you can set video.filmAutomatically = false
and or gif.filmAutomatically = false
. In that case the recording needs to be started and finished manually in the test code using the following methods:
FilmTestExecution.startVideoRecording(String <fileName>);
// some
FilmTestExecution.finishVideoFilming(String <fileName>, boolean <testFailed>);
If testFailed
is true
, the recording will be added to the allure report. For false
, the recording will only be added to the allure report, if the recording property appendAllRecordingsToAllureReport
is set to true
. |
Overview
Neodymium features
- Neodymium configuration properties
- Neodymium context
- Utility classes
- Test data provider
- Test Environments
- Multi browser support
- Applitools Plugin
- Localization
- Highlight and Wait
- Advanced Screenshots
- Seperate Browser Sessions for Setup and Cleanup
Best practices and used frameworks
Special