Jarek
Jarek

Reputation: 7729

Patterns for filling in-memory databases with testing data

I would like to know what would be the best way to fill in memory database for testing with test data - how to manage such data, how to make simple insert scripts, what are good tools to support this ect...

Upvotes: 0

Views: 525

Answers (2)

Persimmonium
Persimmonium

Reputation: 15789

I see two approaches:

  1. Generate data, with this for example
  2. Use a subset of real data, that can be extracted with this, keeping referential integrity etc

Upvotes: 1

rsp
rsp

Reputation: 23373

One possible approach is the one taken by DbUnit, which offers classes to export and import table content to and from XML files. You can use it to (re-)load your tables with a predetermined set of test data.

Upvotes: 1

Related Questions