1

I am writing integration tests for my flutter application which uses firebases' fireflutter.

I have a very basic Unit Test that just loads the application

void main() {
  IntegrationTestWidgetsFlutterBinding.ensureInitialized();

  testWidgets("Test", (tester) async{

    app.main();
    await tester.pumpAndSettle();
  });

}

Upon running this I get the error:

══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following PlatformException was thrown running a test:
PlatformException(channel-error, Unable to establish connection on channel., null, null)

When the exception was thrown, this was the stack:
#0      FirebaseCoreHostApi.initializeCore (package:firebase_core_platform_interface/src/pigeon/messages.pigeon.dart:203:7)
<asynchronous suspension>
<asynchronous suspension>
(elided one frame from package:stack_trace)

All of my packages are up to date, and the application works fine apart from the tests.

Sian
  • 11
  • 1

0 Answers0