You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A testWidgets alternative working for lower level compatibility #61511
Currently testWidgets is providing WidgetTester as the solution for driving the test.
WidgetTester is a good infrastructure for unit test, but may have been too complicated and at a too high level for implementing all the tests we need. Meanwhile we have LiveWidgetController which is a minimal implementation for WidgetController and is used internally in flutter_driver.
WidgetController may be a better interface for controlling the app on performance/integration test:
WidgetController is the base class, meaning the testing code will be able to run for all our current testing tools: flutter_test/WidgetTester, flutter_drive, e2e or even the real release app. This will be extremely helpful for running shader warmup on the user's device.
One way to implement it is to provide a testWidgets alternative, which restrict its callback to only use WidgetController rather than WidgetTester. Meanwhile, some wraps of driving the test provided by WidgetTester should not have difficulties promoted to WidgetController, e.g. WidgetTester.ensureVisible.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
CareF commentedon Jul 15, 2020
The idea credit to @liyuqian
TahaTesser commentedon Jul 15, 2020
Sounds like proposal for alternative, added
proposalCareF commentedon Jul 16, 2020
A demo https://github.com/CareF/flutter_perf_widget_demo
@liyuqian @AlbertWang0116 @dnfield
github-actions commentedon Aug 13, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.