-
Notifications
You must be signed in to change notification settings - Fork 30.6k
How to debug integration tests #88756
Copy link
Copy link
Open
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projecta: tests"flutter test", flutter_test, or one of our tests"flutter test", flutter_test, or one of our testsc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterf: integration_testThe flutter/packages/integration_test pluginThe flutter/packages/integration_test pluginframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.t: flutter driver"flutter driver", flutter_drive, or a driver test"flutter driver", flutter_drive, or a driver testteam-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team
Description
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projecta: tests"flutter test", flutter_test, or one of our tests"flutter test", flutter_test, or one of our testsc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to FlutterA detailed proposal for a change to Flutterf: integration_testThe flutter/packages/integration_test pluginThe flutter/packages/integration_test pluginframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.t: flutter driver"flutter driver", flutter_drive, or a driver test"flutter driver", flutter_drive, or a driver testteam-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team
Type
Fields
Give feedbackNo fields configured for issues without a type.
Use case
I'm developing an integration test for a mobile app. When the test fails, the test log says "Failed to stop app" and the app shows a black screen. I need some way to examine the state of the app and find out why it failed.
I am not asking to run the test in a debugger. I just want to fix my broken test. The Flutter tooling makes this very difficult.
Adding a
dart:io:sleep()orawait Future.delayed()leaves the app's UI frozen and not scrollable.So far the best I can do is add print statements and take a video of the app in Apple Simulator and step through it frame-by-frame. This is a slow and frustrating way to fix tests.
Proposal
Provide some way to examine the state of the app when an integration test fails.
Ideas:
flutter_driverand make it usable. One can comment out the call toFlutterDriver.close()and the app will remain live and usable after the test stops.