Video Record your Selenium Tests

When a Selenium test fails, you usually get a clear error message or trace to indicate where the problem is located. A video of your Selenium test will offer even more help in finding out just why your Selenium test failed.
By video-recording your Selenium test, you can track down when and where a problem occurs.

We at TestingBot video record every Selenium test on our grid.
When a test fails, you can log into our member area, click the failed test and see a video of your test.
This video is also available through our API, so you can easily integrate this feature into your Continuous Integration system.

Together with a video, we also take a full-screen screenshot of every single step in your test. This provides for another method to examine your tests.
These screenshots are available in our member area or by accessing our API.

It’s important to note that video recording your test does not slow down the execution of your test.
We use the Windows built-in screen recording capabilities, which uses very little CPU.

The video is recorded into a WMV file, then later encoded to an FLV file on a separate server, before it’s available to the customer. This process takes between 1 and 3 minutes to complete.

Below is a Ruby code example of running a test and grabbing the video and screenshots from our API.

require "rubygems"
gem "selenium-client"
require "selenium/client"
gem 'test-unit'
require 'test/unit'

gem "testingbot"
require "testingbot"

class ExampleTest < TestingBot::TestCase
attr_reader :browser
  def setup
     browser = \
        :host => "",
        :port => 4444,
        :browser => "iexplore",
        :version => "9",
        :platform => "WINDOWS",
        :url => "",
        :timeout_in_second => 60


  def teardown

  def test_page_open "/"
    p browser.session_id

This code will return a String with the session_id of the test (a unique identifier for the test).
For example, the session_id we receive is: “7f5br7939150a9f199d2215920403e83”

You can then query our API to fetch the video and screenshots of this test:

curl -u key:secret

This call will return a JSON formatted string with the following data:


The response contains the video URL ( and the thumbnails of every step in your test.

This is just one example call to our API, for more information, please consult our API guide.

No Comments

Leave a Reply

Your email address will not be published. Required fields are marked *