开发者

DBUnit automatic dataset generation

开发者 https://www.devze.com 2022-12-21 19:00 出处:网络
I have seen a couple of question regarding creating datasets in DbUnit here on StackOverflow, but all of them were regarding export data from existin开发者_如何学Gog tables.

I have seen a couple of question regarding creating datasets in DbUnit here on StackOverflow, but all of them were regarding export data from existin开发者_如何学Gog tables.

My question is, can DBUnit create some dummy dataset basing on my database schema? I don't care whether the strings would be like "ZDSFFDSDGF" and BLOBS would be just garbage. I just need some test data and I'd prefer to spend my time developing instead of populating my tables.

Any solutions, pointers? A Netbeans plugin doing that would be just great, but I guess this is just a wishful thinking...


You could use a database mock data generator to feed your database and then dump the table content with DBUnit. I have experience with dbMonster and databene benerator (see this previous answer).

I would actually recommend the later in your case because it can create database snapshots directly in DbUnit format. There is an Eclipse plugin but sadly nothing for NetBeans AFAIK.

UPD. 2016: The eclipse plugin is discontinued.

0

精彩评论

暂无评论...
验证码 换一张
取 消