Record Selenium Test Video

It is important for automation tester to verify that his/her scripts are working fine. One way to ensure this is to record the test execution. There are many tools for this purpose. But what if the execution is being done unattended. Wouldn’t it be nice to record the video automatically?

ATUTestRecorder is one such utility by which you can record Selenium test video. It records the test execution test case wise and stores in “.mov” files. Follow below steps to record Selenium test video using ATUTestRecorder.

  • Download ATUTestRecorder from this location.
  • Reference the downloaded JAR file in your Selenium project and import the ATUTestRecorder package in your Java class.
  • In your test case, set up recorder using below code. Replace “Directory” parameter with the file system folder of your choice. Similarly, replace “Filename” parameter.
  • Now, start the recorder with the code below. It will start recording the test case.
  • After completion of recording, stop the recorder using below code.
  • Your code should now resemble below sample.

You have an option to enable/disable audio recording. These options can be set while creating instance of TestRecorder class. Also, make sure the directory exist in your file system to store your recorded video. Otherwise the test execution will be terminated with an error.

It’s a good practice for a tester to record Selenium test video. This helps in debugging the scripts and also serves the purpose as an evidence of the test execution. Do you think recording the test execution is useful? Let us know your views on this by comments.

  1. AK

Leave a Reply

Your email address will not be published.