You need Mongo running on your machine first as the embedded Mongo used for the testsuite is ran from Maven.
Once you have Mongo running locally it's pretty easy, edit (but don't commit the changes):
testsuite/integration/src/test/resources/META-INF/keycloak-server.json
Change the providers to mongo. There are default settings for Mongo already there and should work as long as you have Mongo running locally.
I find it easier to just change the keycloak-server.json directly, but you can also use system properties to set the providers, but that's pretty annoying to do when your running tests from IntelliJ.