#73 open
Mathijs Kwik

Generate realistic testing-data

Reported by Mathijs Kwik | July 29th, 2008 @ 02:23 AM | in Beyond Hobo 1.0

To quickly fill an application with some basic data to get a better 'feel' of the end-result, Hobofields should be extended to setup some records with realistic-looking data.

This can also help spotting performance-issues earlier so query-adjustments/indexes/caching can be applied in an early stage.

There's a gem/plugin for rails that does this but I can't remember its name atm.

It has support for names, email-adresses, phone-numbers and such, a huge word-list and lorem-ipsum generator.

I'm not sure this belongs in hobofields, maybe a rake-task might be more suitable, but it can use hobofields to find out more about what kind of data is expected.

Maybe some kind of combination with thoughtbot's factory_girl might be suitable as well to replace fixtures for testing, and have a decently-filled app during development.

Comments and changes to this ticket

  • Tom Locke

    Tom Locke July 29th, 2008 @ 08:57 AM

    +1

    I think this should be a separate plugin. As I've just learned, Rails is happy for plugins to be grouped in sub-folders, which makes me feel a lot happier about having a whole bunch of small plugins. We could come up with a way to install a whole suite of plugins in one go.

    And yeah - I remember coming across that gem - can't remember what its called though. Someone on the Rails IRC will know I guess

  • Tom Locke

    Tom Locke July 29th, 2008 @ 09:06 AM

    • Milestone set to Beyond Hobo 1.0
  • Tom Locke

    Tom Locke July 29th, 2008 @ 10:57 AM

    • State changed from “new” to “open”
  • Mathijs Kwik

    Mathijs Kwik August 2nd, 2008 @ 01:15 PM

    The gem is called 'Faker' (http://faker.rubyforge.org/)

    I think this probably fits somewhere in hobofields, So you can tell what fields need what type of data (name address a.s.o.), maybe some default guesses might be nice too.

    Then some model-wide option like 'fake_number_of_records'.

    And probably a rake task like rake:db:fake that adds the number of fake records per model using Faker methods described in fields.

  • Tom Locke

    Tom Locke August 3rd, 2008 @ 10:48 AM

    • Title changed from “[wishlist] realistic testing-data” to “Generate realistic testing-data”
    • Tag changed from hobofields to enhancement, hobofields

    Removing wish-list from the title -- tagging with enhancement instead. The way I'm seeing it, anything tagged 'enhancement' but assigned to the Beyond 1.0 milestone is effectively a wishlist ticket.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket

Pages