Home > Software design >  Can I do flutter widget testing on a real device?
Can I do flutter widget testing on a real device?

Time:08-01

Flutter supports Widget testing with custom clicks and etc, using some mocked stuff: https://docs.flutter.dev/cookbook/testing/widget/introduction

The question is: can I test on a real device? I wanted to test a lot of stuff that is device dependent, both on Android, iOS and Linux.

CodePudding user response:

Yes In flutter there is an option you get to test the application on a real device or simulator called integration testing.

This will display all the tests on the device.

You can also generate goldens (UI) Snapshots according to different screen sizes and get a hint of the design instead of running the entire test on a real device. This will save a lot of time in minute changes and you can always end with integration testing.

  • Related