Permalink
Browse files

Readme draft.

  • Loading branch information...
1 parent 250806c commit b7b983ff96b174deb6c13f9b9491380925386668 @iafonov iafonov committed Aug 17, 2011
Showing with 25 additions and 0 deletions.
  1. +25 −0 README.md
View
25 README.md
@@ -60,6 +60,31 @@ Running cucumber headless is now as simple as adding a before and after hook in
end
end
+## Capturing video
+
+Video is captured using `ffmpeg` application. You can install it on ubuntu via `sudo apt-get install ffmpeg` or on OS X via `brew install ffmpeg`. You can capture video continuously or capture scenarios separately. Here is typical use case:
+
+ require 'headless'
+
+ headless = Headless.new
+ headless.start
+
+ at_exit do
+ headless.destroy
+ end
+
+ Before do
+ headless.video.capture
+ end
+
+ After do |scenario|
+ if scenario.failed?
+ headless.video.stop_and_save("/tmp/#{BUILD_ID}/#{scenario.name.split.join("_")}.mov")
+ else
+ headless.video.stop_and_clear
+ end
+ end
+
---
© 2010 Leonid Shevtsov, released under the MIT license

0 comments on commit b7b983f

Please sign in to comment.