PDA

View Full Version : [RubyForge] ActiveSalesforce:ASF 0.4.2 adds session recording/replay support


ruby-lang
March 8th, 2006, 06:25 PM
Ruby on Rails + ActiveSalesforce (ASF) is a very cool prototyping environment! Especially now that I am almost done with the ASF scaffolding generator that kicks out nice looking pages...

Something that could be very useful for prototyping is the generalized session recording support I added initially for unit testing performance (makes it so our utest run in 1 sec instead of 1.5 minutes) but have recently expanded to allow me to work disconnected (e.g. on the flight to ETech on Monday!).

Basically you can add something like:

recording: true
recording_source: test.recording

to your app's database.yml and run through your demo scenario and all of the sfdc api request/response pairs will be recorded to the file test.recording. When you have exercised the parts of your app you need for the demo scenario (dev/testing scenarios in my case) you shut down your server, comment out:

#recording: true

and restart your server. Now all of your responses will actually come from the recorded session file!!!

<a href="http://rubyforge.org/forum/forum.php?forum_id=5889" target="_blank">http://rubyforge.org/forum/forum.php?forum_id=5889</a>