We are a github organization. You are invited to participate. Every version < 4.x.x is considered as legacy.
Embedded MongoDB will provide a platform neutral way for running mongodb in unittests.
- dropping databases causing some pains (often you have to wait long time after each test)
- its easy, much easier as installing right version by hand
- you can change version per test
- download mongodb (and cache it)
- extract it (and cache it)
- java uses its process api to start and monitor the mongo process
- you run your tests
- java kills the mongo process
We use http://www.apache.org/licenses/LICENSE-2.0
- Embed Process Util de.flapdoodle.embed.process
- in a Maven build using maven-mongodb-plugin or embedmongo-maven-plugin
- in a Clojure/Leiningen project using lein-embongo
- in a Gradle build using gradle-mongo-plugin
- in a Scala/specs2 specification using specs2-embedmongo
- in Scala tests using scalatest-embedmongo
<dependency>
<groupId>de.flapdoodle.embed</groupId>
<artifactId>de.flapdoodle.embed.mongo</artifactId>
<version>4.3.3</version>
</dependency>
As the spring projects removed the embed mongo support in 2.7.0 you should consider to use one of these integration projects. It should behave mostly like the original spring integration, but there are some minor differences:
- version in 'spring.mongodb.embedded.version' is used in package resolver and is not matched against version enum.
- 'spring.mongodb.embedded.features' is not supported (not the way to change the config of mongodb)
If you have any trouble in using them fell free to create an issue.