How to Test Flutter Apps With Perfecto & Appium
Flutter is a free and open-source mobile UI framework created by Google and released in May 2017. The Flutter framework allows users to create native mobile applications for Android and iOS with one programming language and codebase.
Just like other mobile app variations, such as Progressive Web Apps and APKs, Flutter has grown in popularity over the last few years. With many businesses investing a significant amount of time and effort to modernize their application, let’s revisit what is needed to run automated tests for Flutter apps effectively.
With Perfecto, testing Flutter apps is possible through our integration with Appium.
This blog post will give a detailed overview of Perfecto’s support of Flutter apps for Android and iOS automation with Appium.
Android & iOS Devices in the Perfecto Cloud
Let us delve into Flutter testing with Perfecto by starting with a side-by-side view of the eBay Motors app.
Both applications were created using Flutter in the Perfecto cloud, one on a Samsung Galaxy S9 and the other on an Apple iPhone 12 Mini.
Perfecto Object Spy for Android
Perfecto’s “Object Spy” feature can show the application’s object properties, which can be used in Appium scripts. The following image shows the Object Spy for a Flutter app on a Samsung Galaxy S9.
Perfecto Object Spy for iOS
For iOS, you need to configure some settings on the device to expose the object properties needed to work with Appium.
On your iPhone device, go into Settings App -> Accessibility -> Spoken Content.
Then swipe to enable the “Speak Selection” and “Speak Screen” capabilities.
Here is a side-by-side view of Perfecto Object Spy before and after changing these settings on an iPhone-12 Mini.
Executing an Automated Flutter Test With Perfecto & Appium
From a scripting perspective, testing Flutter apps does not require any changes in writing Appium tests. Here is a sample of automation code.
In the following video, you will see how quickly you can execute parallel Appium Flutter tests on Android and iOS devices.
Testing Flutter apps with Perfecto is easier than ever through our integration with Appium. By configuring a few settings to expose object properties correctly, you can test on iOS and Android devices in no time. With Perfecto and Appium, organizations can rest assured that they can release high-quality Flutter applications quickly.
Watch Flutter Application Testing in Action
See a demo of testing Flutter apps with Perfecto.