Embedded MongoDB when running integration tests
Posted
by
seanhodges
on Stack Overflow
See other posts from Stack Overflow
or by seanhodges
Published on 2011-06-22T08:48:57Z
Indexed on
2012/12/17
17:03 UTC
Read the original article
Hit count: 224
My question is a variation of this one.
Since my Java Web-app project requires a lot of read filters/queries and interfaces with tools like GridFS, I'm struggling to think of a sensible way to simulate MongoDB in the way the above solution suggests.
Therefore, I'm considering running an embedded instance of MongoDB alongside my integration tests. I'd like it to start up automatically (either for each test or the whole suite), flush the database for every test, and shut down at the end. These tests might be run on development machines as well as the CI server, so my solution will also need to be portable.
Can anyone with more knowledge on MongoDB help me get idea of the feasibility of this approach, and/or perhaps suggest any reading material that might help me get started?
I'm also open to other suggestions people might have on how I could approach this problem...
© Stack Overflow or respective owner