Search code examples
postgresqldatabasetest-data

Automatically generated test data to a DB from a schema?


I have a discussion-db, and I need a great amount of test data, for different sized samples. Please, see the ready SELECT, JOIN and CREATE-queries, please scroll down in the link.

  1. How can I automatically generate test data to the db?

  2. How to generate test data in different sized samples?

  3. Is there some ready tool?


Solution

  • Here are a couple of suggestions for free tools that generate test data:

    • Databene Benerator: supports many JDBC-capable database brands, uses XML format compatible with DbUnit, GPL license.

    • Super Smack: originally a load-test tool for MySQL, it also supports PostgreSQL and it includes a generator of mock data.

    I asked a similar question here on StackOverflow in February, and the two choices above seemed like the best options.