19

I have automated scripts that run every night (around 350 scripts or testcases). I want to record a video of each test case (Python scripts). Is there a tool or way that I can use to control video recording for each test case separately?

For instance, during a test case setup start recording and during teardown stop recording and save the video locally with a specified name and date. So I should have 350 videos for each testcase (more preferably save only videos for the failed test cases).

Is there a way of integrating this functionality in the code I use for my setups and teardowns?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Adam
  • 283
  • 1
  • 5
  • 15
  • http://www.theautomatedtester.co.uk/blog/2010/castro-selenium-video.html – root Feb 05 '13 at 11:18
  • 1
    Do you really need a video, when it is trivially easy to [take a ScreenShot][1]? [1]: http://stackoverflow.com/questions/3422262/take-a-screenshot-with-selenium-webdriver – Martin Spamer Feb 05 '13 at 15:24
  • 5
    Yes I use screenshots already but som test cases fail during the nightly runs without any help from the screenshot. I need to see what happens prior to the moment of failure not the failure itself – Adam Feb 08 '13 at 14:02

3 Answers3

8

A simple webdriver has no function to record video; you need to use a third-party library, like Castro(only support python 2).

For a Java webdriver, look at blog post Screen Recording (Video) of Java Webdriver script.

Nam G VU
  • 33,193
  • 69
  • 233
  • 372
Akib
  • 96
  • 1
  • 2
1

You can use Castro in Python...

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
user1822881
  • 203
  • 1
  • 3
  • 7
-1

You can use the following web service http://bit.ly/video-recorder-service which can be remotely controlled with simple http requests.

I have used this for webdriver tests in a grid environment.