Suppose that you are writing a MongoDB
driver for java. To verify if all the implemented functionality works correctly, you ideally want to test it against a REAL MongoDB server. This brings a couple of challenges:
- Mongo is not written in java, so we can not embed it easily in our java application
- We need to install and configure MongoDB somewhere, and maintain the installation, or write scripts to set it up as part of our test run.
- Every test we run against the mongo server, will change the state, and tests might influence each other. We want to isolate our tests as much as possible.
- We want to test our driver against multiple versions of MongoDB.
- We want to run the tests as fast as possible. If we want to run tests in parallel, we need multiple servers. How do we manage them?
Let's try to address these challenges. Read more.