*dont* empty the database...?

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 B. wrote:

thanks
al


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

Mikkel B.

www.strongside.dk - Football Portal(DK)
ting.minline.dk - Buy Old Stuff!(DK)

Alan B. 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
Which 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.

On 07/04/06, Alex Y. [email protected] wrote:

Alan B. 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/