开发者

What kind of tools are available for populating test data into mongodb

What kind of tools are available for populating test data in mongodb. We have used dbunit in the past,开发者_运维问答 but it doesn't seem to have an equivalent maven plugin.


http://eliothorowitz.com/post/459890033/streaming-twitter-into-mongodb how does this look? Now all you need is a JSON or CSV generator which is much easier to be found.


First question is from what source you want load data? From another mongodb, from sql, from xml, from text file, etc..

As for me, i using some helper classes(one per each my mongo document) thats create some entity, that i need during testing. Also i have one test class per each my business object, and before test start i run helpers in order to create test environment, after test finished i delete all created data. Such approach work even at production database.

I can suggest another approch. For example if you have some production mongo db with data you can copy mongo data, run new mongo db on this data and run your tests and after tests has finished, delete this db.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜