[rspec-users] Should acceptance tests be run against a production environment?

Joseph Wilk josephwilk at joesniff.co.uk
Wed Oct 29 05:45:20 EDT 2008

Pat Maddox wrote:
> When you do end-to-end acceptance testing with Selenium, I think it
> should be run against a production environment.  Not THE production
> environment, mind you, but simply a new Rails app running with
> RAILS_ENV=production.  Also, transactional fixtures should be turned
> off.  This is so that the app runs as closely as possible to how it does
> from a regular user's perspective.  Models and pages get cached,
> transactions commit and rollback as they're defined, etc.  What do you
> think?  Am I off base here?
That is exactly what I do Pat. I want to get as close to testing the 
real users experience as possible. In the end those real user 
experiences are my greatest concern. When you move away from testing a 
production rails instances you leave yourself open to 'Users are 
complaining about X not working. Well it worked in testing' :)

It however does mean you have to be very careful to isolate your 
acceptance tests from each other due to caching/session/cookie/database 

Joseph Wilk

More information about the rspec-users mailing list