>>> Is anyone against having an instance of Mongo DB instantiated and >>> destroyed when tests are run? I'm already assuming the developer doesn't >>> need to have Mongo DB already installed, as well. >> How much of an overhead is that going to add to the running of the >> tests? Inutition suggests that instantiating a DB is going to be a >> pretty heavy job... > It will only take 30 seconds or a little less/more (depending on your > internet connection) to download the Mongo distribution for your > OS/arch. After that, database population, tests and shutdown take around > 15 seconds (Core 2 Duo 2.4 GHz, 4GB DDR2, SSD disk).
That sounds reasonable for testing. (Though I don't think fetching outside of distro-specific package managers is a good idea. An error saying please install MongoDB from your distro's package repository before running these tests would be ok.) > Btw, just to clarify, I have only one Mongo DB instance for all tests > and not an instance per test. Can you be sure of full isolation if you setup one instance and then run each test? You would need to revert all changes at the end of each test before you could run the next...
