0

Running e2e test via patrol for a flutter written app.

Exception has occurred. _AssertionError ('package:flutter/src/foundation/binding.dart': Failed assertion: line 149 pos 12: '_debugInitializedType == null': is not true.)

enter image description here

Manish
  • 17
  • 1
  • 9

1 Answers1

0

Please remove the call to IntegrationTestWidgetsFlutterBinding.ensureInitialized(). Patrol has its own binding and you mustn't interfere with it.


EDIT How are you running your tests? I'm pretty sure you're using flutter test integration_test, which does not work. You must run tests with Patrol CLI.

https://patrol.leancode.co to learn how to use Patrol.

Bartek Pacia
  • 1,085
  • 3
  • 15
  • 37
  • Thanks for you reply. I am running my tests with Patrol CLI but I am getting error while debugging the tests and this error which I am getting is in `package:flutter/src/foundation/binding.dart` which is in flutter sdk. Thanks – Manish Jun 14 '23 at 09:23