Poperton
Poperton

Reputation: 1746

Can I do flutter widget testing on a real device?

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.

Upvotes: 2

Views: 1506

Answers (1)

shree bhagwat
shree bhagwat

Reputation: 480

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.

Upvotes: 2

Related Questions