Repository navigation
Missing integration tests for Flutter on Android #97853
Copy link
Copy link
Open
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: tests"flutter test", flutter_test, or one of our tests"flutter test", flutter_test, or one of our testsengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.platform-androidAndroid applications specificallyAndroid applications specificallyteam-androidOwned by Android platform teamOwned by Android platform teamtriaged-androidTriaged by Android platform teamTriaged by Android platform team
Description
There are a few scenarios that don't have integration tests.
Due to the lack of tests, customers get bugs that are fatal in many cases. e.g. application crash.
We just had one of these issues recently.
Some scenarios:
- Flutter Surface destroyed. Recent issues: http://b/216410309
Shell::OnPlatformViewDestroyedfollowed byShell::OnPlatformViewCreated.
This can happen when the app is sent to the background or the app switch is toggled, then the app is brought to the foreground. - Flutter Activity lifecycle events: pause, stop, destroy, restart, etc.. All these things aren't tested to my knowledge.
- Flutter Fragment. This is mostly used in add-to-app scenarios. The fragment is added to an activity that isn't Flutter Activity in the host app.
- Cached/Shared engines. This is mostly used in add-to-app scenarios. A single FlutterEngine instance is shared across multiple FlutterActivity or FlutterView instances.
- Texture layers. For example: a video like the video_player plugin.
- Platform views interleaved with each of the above scenarios. For example, an app that has multiple Activities. One might be FlutterActivities, while others aren't. We should be testing switching between activities.
- StrictMode e.g.
detectLeakedClosableObjects(), maybe others too. - Status bar. Recent issues: http://b/223628114, Using
systemNavigationBarDividerColorchangesstatusBarIconBrightnessandsystemNavigationBarIconBrightnesson Android11 #100027 - Platform view that renders a SurfaceView, Recent issues: http://b/226467394, Inlining a SurfaceView in a PlatformView in a Flutter hierarchy should have an automated test #100669
To begin, these scenarios should leverage Android emulators, so they can run on presubmit checks. They should also run as part of the engine presubmit checks.
cc @GaryQian
cc @godofredoc @keyonghan I believe there was a plan to run some frameworks tests in the engine. Could we run these in the engine once added?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: tests"flutter test", flutter_test, or one of our tests"flutter test", flutter_test, or one of our testsengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.platform-androidAndroid applications specificallyAndroid applications specificallyteam-androidOwned by Android platform teamOwned by Android platform teamtriaged-androidTriaged by Android platform teamTriaged by Android platform team
Activity
keyonghan commentedon Feb 7, 2022
Here is the tracking issue #83731 to run framework tests on engine.
flutter-triage-bot commentedon Jul 15, 2023
This issue is marked P1 but has had no recent status updates.
The P1 label indicates high-priority issues that are at the top of the work list. This is the highest priority level a bug can have if it isn't affecting a top-tier customer or breaking the build. Bugs marked P1 are generally actively being worked on unless the assignee is dealing with a P0 bug (or another P1 bug). Issues at this level should be resolved in a matter of months and should have monthly updates on GitHub.
Please consider where this bug really falls in our current priorities, and label it or assign it accordingly. This allows people to have a clearer picture of what work is actually planned. Thanks!
camsim99 commentedon Aug 17, 2023
cc @mariamhas for prioritization
mariamhas commentedon Aug 24, 2023
P2 is the right priority for now