[rspec-users] scenarios on production data

Ashley Moran ashley.moran at patchspace.co.uk
Fri Sep 5 11:50:24 EDT 2008


On 4 Sep 2008, at 18:55, Jonathan Linowes wrote:

> I'm just thinking out loud here...
> It could be useful to have a way to run scenarios on a copy of a  
> fully populated production database, as an alternative to normal use.
> Not sure how that'd work, maybe replace the Given's but leave the  
> Whens and Thens?

Hi Jonathan

Every time someone asks me this my answer is always the same...

Don't.  Determine what class of issue is being exposed by your  
production database, distil it into suitable stories and specs, fix  
the code (migrating as necessary), then deploy to a staging  
environment running off a recent production backup DB.

Trying to run tests against production database risks blurring the  
line between the well specified behaviour of your app and the pile of  
crap users inevitably fill it with.  IMHO.

Ashley

-- 
http://www.patchspace.co.uk/
http://aviewfromafar.net/





More information about the rspec-users mailing list