I've just started using Selenium with Rspec and it's working well so
far.  However, i'm testing it against my local development version of
the site (ie running in mongrel).  What i really need to do is run it in
a test environment, so i can do destructive actions repeatedly.

Using fixtures seems like one obvious way to go - since it's a form of
integration testing i don't want to start mocking and stubbing things,
that's just going to cause more confusion and problems than it solves.
So, i could fixture everything up the wazoo.

The problem is, though, that we have a big site with loads of different
tables, and lots of different interrelated models.  Setting up all the
fixtures is going to be a pain in the ass.  So, i thought of a few ways
to go:

1) Make a stripped down version of our db, by basically deleting lots of
records and all their associations out.  Then

  a) Generate fixtures, or some data (maybe even just an sql file) that
is loaded into the db before every test.  This is going to be very slow
as the data will be reloaded *a lot*.

  b) Run every test (or group of tests) in a transaction, so the changes
are always undone after every test.  This should be a lot quicker than
1a.

2) Generate a lot of fixtures somehow using some kind of system that
basically makes it easier to have a lot of associated models.

3) Something else i'm too ignorant to think of.

Does anyone have any advice/guidance/urls/etc regarding this?

thanks
max
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to