I have a Flutter application with a fairly complex set of Firebase security rules that I would like to test properly.
Ideally I would be able to run the same tests in the CI as well as on my local machine - which runs on Linux.
Here is what I did so far:
- Emulator, firebase, etc. is all running fine.
- Running tests that call
Firebase.initializeApp()
fail as the platform is not supported - Running tests with
flutter test --platform chrome test/firebase/minimal_test.dart
results in a timeout - Currently I am experimenting with running the tests in an
integration_test
setup -- which kind of works but is also super complex and very slow. - Switching to another language for the security rules test would also be a possible (but painful) option
- Using either direct API calls and/or the firedart package would also be an option - of similar complexity as switching to JS/TS/Python
So I am wondering is someone has found a smart solution on how to get the security rules test to work in the combination of Dart and Linux.