How to generate random data and to fill database with it?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to generate random data and to fill database with it?

thisissadday
Hello

I'm new to Grails and need some help. I have to fill database with a lot of random data, so i can test database.

1. How to generate automatically domains (where are types, constraints etc) from database tables?
2. How to automatically fill database tables with random data using domains?

All help and links to tutorials are appreciated. Thank you. :)
Reply | Threaded
Open this post in threaded view
|

Re: How to generate random data and to fill database with it?

tomas lin
Hiya,

The reverse engineering plugin will create domains from database:

http://grails.org/plugin/db-reverse-engineer

Once the domains are generated, it's probably easiest to use the
build-test data plugin to create random data.

Build Test Data - http://www.grails.org/plugin/build-test-data

Just write a bootstrap script to populate this data.



On Mon, Jan 9, 2012 at 12:02 PM, thisissadday <[hidden email]> wrote:

> Hello
>
> I'm new to Grails and need some help. I have to fill database with a lot of
> random data, so i can test database.
>
> 1. How to generate automatically domains (where are types, constraints etc)
> from database tables?
> 2. How to automatically fill database tables with random data using domains?
>
> All help and links to tutorials are appreciated. Thank you. :)
>
> --
> View this message in context: http://grails.1312388.n4.nabble.com/How-to-generate-random-data-and-to-fill-database-with-it-tp4278256p4278256.html
> Sent from the Grails - user mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: How to generate random data and to fill database with it?

thisissadday
Thank you, got db-reverse-engineer working, it's generating domain classes fine. =)