Creating a video capture of your Selenium tests using Monte Screen Recorder

In previous posts, I have shown you how to include screen shots in your HTML test reports to help you in debugging tests and identifying the cause of test failures. However, in certain cases, a video showing exact screen states, screen transitions and input as generated by your tests might come in even more handy. This goes expecially when your tests run unattended. Such a video could also help presenting / demonstrating your work to your peers and other stakeholders.

Last week I stumbled upon Monte Screen Recorder, a Java library that can assist you in creating these video captures of your Selenium tests. In this relatively short post, I will show you how to create such a video capture.

Installation and configuration of the Monte Screen Recorder is easy. Simply download the .jar file from here, add it as a dependency to your project and you’re all set.

However, please note that using Monte Screen Recorder, as well as playing back the screen captures afterwards, requires the TechSmith Screen Capture Codec (TSCC) to be installed.

To create a screen capture, all we need to do create a new instance of the ScreenRecorder object with the settings we would like to use. For example:
Continue reading