2

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?

Léo Léopold Hertz 준영
  • 134,464
  • 179
  • 445
  • 697

4 Answers4

6

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.

Community
  • 1
  • 1
Bill Karwin
  • 538,548
  • 86
  • 673
  • 828
2

I know this question is super dated, but I was looking for the answer to this exact question today and I came across this:

http://wiki.postgresql.org/wiki/Sample_Databases

Out of the options listed (including built in tools like pgbench), pgFoundry has several compelling options that works perfectly for the test cases I am working on.

I thought it might help someone like me, so there it is.

jacobfogg
  • 309
  • 2
  • 9
0

I'm not sure how to get automatically generated data and insert it into the database (I'm sure you could pull it off with a python script or something), but if you're just looking for endless blabbering to stick into a db, this should be helpful.

Steve Gattuso
  • 7,644
  • 10
  • 44
  • 59
0

I'm not a postres person, but in many other DBs I've used, a simple mechanism for generating large quantities of test data is a cross join. The technique is particularly useful for generating large quantities of test data.

Here's a nice blog post on it (SQL Server specific though).

RichardOD
  • 28,883
  • 9
  • 61
  • 81