---
title: Automated Flutter App Testing with Appium | TestingBot
description: Automated Appium testing for Flutter apps. Flutter test automation in
  the cloud.
source_url:
  html: https://testingbot.com/support/app-automate/appium/flutter
  md: https://testingbot.com/support/app-automate/appium/flutter/index.md
---
# Automated Flutter App Testing

TestingBot supports automated testing of Flutter apps via [Appium's Flutter Driver](https://github.com/appium-userland/appium-flutter-driver).

To get started, please make sure to follow these steps:

1. Compile your Flutter app in `debug` or `profile` mode.   
 Appium's Flutter driver does not currently support apps built in `release` mode. 

2. Make sure your app's `pubspec.yaml` file contains: 

3. Import the new `dev_dependencies` that you have added in the previous step: 

4. Next, import the `flutter_driver_extension` library in your `main.dart` file: 

5. Your `main.dart` file should contain `enableFlutterDriverExtension()` before `runApp`. 

6. The `automationName` in your desired capabilities should be set to `Flutter`. 

## Preparing your App

You can build an `.apk` file for Android, `.ipa` file for iOS physical devices or `.app` bundle for iOS Simulator testing.

This file needs to be [uploaded](https://testingbot.com#upload) to TestingBot for automated or manual testing.

Please see the table below on how to build your app:

| OS | Build Mode | Command |
| --- | --- | --- |
| Android | debug | 

    flutter build apk --debug

 |
| | profile | 

    flutter build apk --profile

 |
| iOS | debug | 

    flutter build ios --debug

 |
| | simulator | 

    flutter build ios --simulator

 |
| | profile | 

    flutter build ios --profile

 |

- For iOS 14 and higher, please build the app in `profile` mode only.
- Release mode is not supported by Appium's Flutter Driver.
- For iOS real device testing, please use `flutter build ipa`, then do: 

    mkdir Payload
    mv Runner.app Payload/
    zip --symlinks -qr test-app.ipa Payload

## Uploading Your App

Please see our [Upload Mobile App](https://testingbot.com/support/app-automate/help/upload) documentation to find out how to upload your app to TestingBot for testing.

## Example

TestingBot has created a [flutter-demo-app](https://github.com/testingbot/flutter-demo-app) which you can use to run your first Flutter Automated test with TestingBot.

Please see the example below where we run an automated Flutter test on TestingBot.

    const { remote } = require('webdriverio');
    const assert = require('assert');
    const { byValueKey } = require('appium-flutter-finder');
    
    const capabilities = {
      'platformName': 'Android',
      'appium:deviceName': 'Pixel 8',
      'appium:platformVersion': '14.0',
      'appium:automationName': 'Flutter',
      'appium:app': 'https://github.com/testingbot/flutter-demo-app/releases/download/v1.0.0/demo.apk',
      'tb:options': {
        'realDevice': true
      }
    };
    
    (async () => {
      const driver = await remote({
        hostname: 'hub.testingbot.com',
        port: 443,
        protocol: 'https',
        path: '/wd/hub',
        user: 'api_key',
        key: 'api_secret',
        capabilities
      });
    
      const counterTextFinder = byValueKey('counter');
      const buttonFinder = byValueKey('incrementButton');
    
      // appium-flutter-driver exposes Flutter actions via execute('flutter:...')
      assert.strictEqual(await driver.execute('flutter:getText', counterTextFinder), '0');
    
      await driver.execute('flutter:tap', buttonFinder);
      await driver.execute('flutter:tap', buttonFinder);
    
      assert.strictEqual(await driver.execute('flutter:getText', counterTextFinder), '2');
    
      await driver.deleteSession();
    })();

This example test will open the [flutter-demo-app](https://github.com/testingbot/flutter-demo-app), find both the counter number and increment button by `valueKey`.   
 It will then verify the initial number, click the button twice and verify if the number is correct.

You can use the following demo applications to try out automated Flutter testing:

- For iOS simulator testing:   

    https://github.com/testingbot/flutter-demo-app/releases/download/v1.0.0/demo-ios-simulator.zip

- For iOS physical device testing:   

    https://github.com/testingbot/flutter-demo-app/releases/download/v1.0.0/demo.ipa

- For Android testing:   

    https://github.com/testingbot/flutter-demo-app/releases/download/v1.0.0/demo.apk

## Specify Devices

To run your existing tests on TestingBot, your tests will need to be configured to use the TestingBot remote devices. If the test was running on your local machine or network, you can simply change your existing test like this:

To let TestingBot know on which device you want to run your test on, you need to specify the `appium:deviceName`, `appium:platformVersion`, `platformName` and other optional options in the capabilities field.

  ![OS selected](https://testingbot.com/assets/environments/svg/ios-383468addf160fa18d0e431f529420739d7f7d1206175f682fead627d2e99a52.svg) iOS 18.6 › iPhone 16 

Loading environments...

Please wait while we load the available browsers and platforms.

    

## Additional Options

Appium provides [multiple Flutter capabilities](https://github.com/appium/appium-flutter-driver#capabilities) to configure your test.

Additionally, you can use [Flutter Finders](https://github.com/appium/appium-flutter-driver#Finders) and [Flutter Commands](https://github.com/appium/appium-flutter-driver#commands).

Was this page helpful? Yes No 

## Looking for More Help?

Have questions or need more information?   
 You can reach us via the following channels:

- [Email us](https://testingbot.com/contact/new)
- [Join our Slack Channel](https://join.slack.com/t/testingb0t/shared_invite/zt-3bcw9xch-jk19~6XPs_xBrsAgAedkCw)
