Flutter is a free and open-source UI framework created by Google. With the Flutter framework, you can create mobile applications for Android and iOS with one programming language and codebase. With Perfecto, you can perform Flutter-based integration tests that test applications end-to-end to ensure high quality. For more information on Flutter, see our blog post What is the Flutter Framework?

This section provides instructions on how to run Flutter tests with the Perfecto Gradle Plugin in Perfecto. It assumes that you are:

  • Familiar with Flutter
  • Have existing tests to work with
  • Are a novice user of Perfecto

The Perfecto Gradle Plugin allows you to:

  • Select a device or multiple devices from the Perfecto Lab to run Flutter tests for applications.
  • Install the application and test files onto the selected devices.
  • Run the test methods on the devices.
  • See the progress of the test set on the console.
  • Access the Report Library to view the results of the tests.

Setting up the Gradle plugin involves these tasks:

  • Installing the Gradle plugin to prepare the build.gradle file
  • Configuring parameters through a configuration file.
  • Executing a test configuration (JSON), understanding the plugin's output in the terminal window, and analyzing the test session by connecting to execution reports in Perfecto Smart Reporting.

Each Gradle task supports the following actions:

  • Reading of the Perfecto configuration parameters that select the devices to install and run the instrumentation tests
  • Installing the application, testing .app/.ipa files (for iOS) or .apk files (for Android) on Perfecto devices, and running the test methods
  • Generating output to the Gradle console and the Perfecto single test report (STR)  report

A sample project is available here: https://github.com/PerfectoMobileSA/PerfectoFlutterSample

Proceed to the prerequisites and setup steps for: