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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With