In a Spring Boot web environment, our integration tests use an integrated Mongo engine (currently flapdoodle oss embedded mongo). I want to construct a way to make sure that the queries in our repository stack are utilizing the indexes that we have setup.
Right now the only idea I have is to setup a Test Runner
that initializes a large volume of data BeforeClass
, runs the queries, and checks the execution time to make sure they are performant. It seems like an inelegant way to do it and I was hoping there was a better way.