views:

196

answers:

4

Hello, is there a gem or plugin that will populate a database with test data?

+1  A: 

Take a look at Fixtures in Rails. It comes with the standard Rails kit.

See Also: A Guide To Testing Rails Applications - see section 2.3

Gishu
A: 

I think Red Gate's SQL Data Generator will do that. I use their SQL Prompt product. Pretty popular product it seems. Even Scott Gu blogged about them.

[edit] oh, unless you meant for rails ... 8|

mattRo55
+3  A: 

As ever, Ryan Bates has a Railscast on this very subject that covers using the Faker and Populator gems.

John Topley
+2  A: 

For testing, I'm a fan of thoughtbot's factory girl.

teich