I am reviewing the information in the MongoDB documentation regarding test design which is a good 'how' of implementing a test, but I am curious if anyone has any feedback or know of additional resources that elaborate on a cohesive strategy or template for how to pursue TDD when developing with one of these databases.
For a school project I want to adequately test a mongdb that is populated with a collection of entries like the following from a webapp:
{
"_id" : 1234,
"name" : "John",
"coordinates" : [90.1,30.0],
"text" : "A complete sentence would go here."
}
Right off the top I am seeing that generally what I want to do is have a mock database I can populate with test data for testing database operations (the webapp will add new entries and search for existing entries that match search criteria, I am not anticipating it to modify existing entries). However, lacking much experience with test driven development/mongo databases, I am curious to know if there are gaps in my strategy. For example, in addition to testing for correct execution of operations and assertions for validity of inputs, are there other unit tests I should formulate?