Is there a way to run firestore locally (e.g. for testing purposes)?
What would the approach to write tests against the DB (except of using mocks)
You can run the Firestore emulator by running:
gcloud beta emulators firestore start
and then set the FIRESTORE_EMULATOR_HOST
environment variable as per the console output (e.g. run export FIRESTORE_EMULATOR_HOST=::1:8505
).
This requires the Google Cloud SDK and a Java 8+ JRE installed and on your system PATH.