framePolicy property

LiveTestWidgetsFlutterBindingFramePolicy framePolicy
read / write

Whether to have pump with a duration only pump a single frame (as would happen in a normal test environment using AutomatedTestWidgetsFlutterBinding), or whether to instead pump every frame that the system requests during any asynchronous pause in the test (as would normally happen when running an application with WidgetsFlutterBinding).

Setting this to anything other than LiveTestWidgetsFlutterBindingFramePolicy.onlyPumps means pumping extra frames, which might involve calling builders more, or calling paint callbacks more, etc, which might interfere with the test. If you know your test file wouldn't be affected by this, you can set it to LiveTestWidgetsFlutterBindingFramePolicy.fullyLive persistently in that particular test file. To set this to LiveTestWidgetsFlutterBindingFramePolicy.fullyLive while still allowing the test file to work as a normal test, add the following code to your test file at the top of your void main() { } function, before calls to testWidgets:

TestWidgetsFlutterBinding binding = TestWidgetsFlutterBinding.ensureInitialized();
if (binding is LiveTestWidgetsFlutterBinding)
  binding.framePolicy = LiveTestWidgetsFlutterBindingFramePolicy.fullyLive;

Implementation

LiveTestWidgetsFlutterBindingFramePolicy framePolicy = LiveTestWidgetsFlutterBindingFramePolicy.fadePointers