I''d like to test against a very large dataset - is there anyway to prevent the data in the test database being destroyed on each test run? storing the dataset in fixtures causes the tests to take several minutes to complete, even using csv fixtures, and that''s just for one test case! I''d appreciate any suggestions on how to preserve the data in the test database between test runs thanks al
why would you need so much test data?? On Friday, April 07, 2006, at 10:34 AM, Alan Bullock wrote:>I''d like to test against a very large dataset - is there anyway to prevent >the data in the test database being destroyed on each test run? >storing the >dataset in fixtures causes the tests to take several minutes to complete, >even using csv fixtures, and that''s just for one test case! > >I''d appreciate any suggestions on how to preserve the data in the >test database >between test runs > >thanks >al > >_______________________________________________ >Rails mailing list >Rails@lists.rubyonrails.org >http://lists.rubyonrails.org/mailman/listinfo/railsMikkel Bruun www.strongside.dk - Football Portal(DK) ting.minline.dk - Buy Old Stuff!(DK) -- Posted with http://DevLists.com. Sign up and save your mailbox.
Alan Bullock wrote:> I''d like to test against a very large dataset - is there anyway to prevent > the data in the test database being destroyed on each test run? storing the > dataset in fixtures causes the tests to take several minutes to complete, > even using csv fixtures, and that''s just for one test case! > > I''d appreciate any suggestions on how to preserve the data in the test database > between test runsWhich DB are you using? If it''s got a nice self-contained file-based store (like sqlite) you could stop the DB and swap the test data in from a backup each test run. That way there''s no fixture load overhead, but you''d need to customise the rake task if you want it fully automated... There may well be a better way, but for the moment it escapes me. -- Alex
On 07/04/06, Alex Young <alex@blackkettle.org> wrote:> Alan Bullock wrote: > > I''d like to test against a very large dataset - is there anyway to prevent > > the data in the test database being destroyed on each test run? storing the > > dataset in fixtures causes the tests to take several minutes to complete, > > even using csv fixtures, and that''s just for one test case!Does your db support transactions? check test/test_helper.rb says self.use_transactional_fixtures = true -- Rasputin :: Jack of All Trades - Master of Nuns http://number9.hellooperator.net/