Creating performance test fixtures from development db? How?

Hi all!

I’m looking into the testing chapter of Agile Web D. With Rails
(2nd ed.).
I want to performance test my app, but I’m too lazy to write fixtures
performance test.
I’d rather use the data from my development db (because the data is so
to the production data).
How do I get the data into the test db without writing fixtures?

Could you please point me to an example of how to do this?


You want the to_fixture plugin.

        - dan

Dan K. mailto:[email protected] tel:+1-415-233-1000

Thanks Dan.
I’ll look into that right away. Hopefully it has support for HABTM

Once again, thanks for your fast answer.


On 7/24/06, Dan K. [email protected] wrote:

You want the to_fixture plugin.

Oh darn.
The plugin doesn’t really manage to save decent fixtures of my UTF-8
The fixtures just don’t work when running the tests afterwards. Any

Here’s what I tried so far:

I’ve tried converting the .rb files in the plugin to UTF-8 still no

Right now, I’m testing with the word “Café” (accent over the “e”), and
goes out in the Yaml file as: “Caf\xC3\xA9”

Error trace from my rake test below:
(where “\xC3\xB8” should have been the Danish letter “ø”, o slash )

Any thoughts on how to make it work?

Exception: a YAML error occured parsing
Please note that YAML must be consistently indented using spaces. Tabs
not allowed. Please have a look at
The exact error was: ArgumentError: syntax error on line 1198, col 41:
: "eksport\xC3\xB8rregistrering" comp' ./config/../vendor/rails/activerecord/lib/active_record/fixtures.rb:311:inread_fixture_files’
initialize' ./config/../vendor/rails/activerecord/lib/active_record/fixtures.rb:251:increate_fixtures’
create_fixtures' ./config/../vendor/rails/activerecord/lib/active_record/base.rb:794:insilence’
create_fixtures' ./config/../vendor/rails/activerecord/lib/active_record/fixtures.rb:565:inload_fixtures’
setup_with_fixtures' ./config/../vendor/rails/activerecord/lib/active_record/fixtures.rb:547:insetup’
./ruby/lib/ruby/1.8/test/unit/testcase.rb:69:in run' ./ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:inrun’
./ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in run' ./ruby/lib/ruby/1.8/test/unit/testsuite.rb:32:inrun’
./ruby/lib/ruby/1.8/test/unit/testsuite.rb:31:in run' ./ruby/lib/ruby/1.8/test/unit/ui/testrunnermediator.rb:44:inrun_suite’
start_mediator' ./radrails/plugins/org.rubypeople.rdt.testunit_0.8.0.604272100PRD/ruby/RemoteTestRunner.rb:52:instart’

On 7/24/06, Jesper Rønn-Jensen [email protected] wrote:

On 7/24/06, Dan K. [email protected] wrote:

You want the to_fixture plugin.

Jesper Rønn-Jensen
Capgemini Danmark A/S
Oernegaardsvej 16
DK - 2820 Gentofte

+45 23 73 62 20 (Mobile)
+45 70 11 22 01 (Fax) (Website)
[email protected] (Corporate e-mail)
[email protected] (Private e-mail and Google Talk IM)
IM: [email protected] (MSN)
LinkedIn: (weblog)

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs