Skip to main content

Test Flutter apps

You can now test your Flutter apps on BrowserStack App Automate platform. We have added support for Appium’s Flutter driver to test Flutter apps using Appium testing framework on BrowserStack. The workflow is similar to other native apps where you upload the app first and then execute the test scripts.

Pre-requisites for testing Flutter apps

Before you run your Flutter app tests, please ensure the following:

  1. Your Flutter app must be compiled in debug or profile mode, since Appium’s Flutter driver does not support apps built in release mode.
  2. Add the following dependencies in your app’s pubspec.yaml file:

     dev_dependencies:
       test: any
       flutter_test:
         sdk: flutter
       flutter_driver:
         sdk: flutter
    
  3. Ensure that your Flutter app has enableFlutterDriverExtension() added before runApp in main.dart file as shown below:

     void main() {
      	enableFlutterDriverExtension();
      	init();
     	runApp(MyApp());
     }
    
  4. Set Flutter as the automation engine in your test scripts. Example:
DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
desiredCapabilities.setCapability("automationName", "Flutter");
var capabilities = {
	'automationName': 'Flutter'
}
desired_cap = {
	'automationName': 'Flutter'
}
desired_caps = {
    'automationName': 'Flutter'
}
Note: Appium Flutter driver is currently supported on Appium version 1.16.0 and above on both Android and iOS

Need some help?

If you have any queries, please get in touch with us.

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback!

Talk to an Expert
Talk to an Expert