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 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 documentation to find out how to upload your app to TestingBot for testing.
Example
TestingBot has created a 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');constassert=require('assert');const{byValueKey}=require('appium-flutter-finder');constcapabilities={'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 ()=>{constdriver=awaitremote({hostname:'hub.testingbot.com',port:443,protocol:'https',path:'/wd/hub',connectionRetryTimeout:420000,// real devices can queue for up to ~390sconnectionRetryCount:0,// a retry would queue a second device requestuser:'api_key',key:'api_secret',capabilities});constcounterTextFinder=byValueKey('counter');constbuttonFinder=byValueKey('incrementButton');// appium-flutter-finder returns a finder you pass to standard WebdriverIO element commandsassert.strictEqual(awaitdriver.getElementText(counterTextFinder),'0');awaitdriver.elementClick(buttonFinder);awaitdriver.elementClick(buttonFinder);assert.strictEqual(awaitdriver.getElementText(counterTextFinder),'2');awaitdriver.deleteSession();})();
This example test will open the 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:
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.
Loading environments...
Please wait while we load the available browsers and platforms.
See our Appium Flutter Driver article for background on what Flutter compiles to and how to build an app that the driver can inspect.
Flutter Integration Driver
Besides the Flutter Driver used on this page, TestingBot also installs the Appium Flutter Integration Driver for some Appium versions. It is a newer driver that talks to your app through Flutter's integration test framework instead of the Flutter Driver extension. To use it, prepare your app as described in that driver's documentation, and set appium:automationName to FlutterIntegration.
The Flutter Integration Driver is installed with these Appium versions only. Choose one with the appiumVersion capability:
Appium version
Flutter Integration Driver
3.8.0
2.0.3
2.17.0
1.1.3
2.11.3
1.1.3
2.10.3
1.1.3
Appium 3.2.2, 3.0.1 and versions older than 2.10.3 do not have it; use the Flutter Driver (Flutter) with those. Set the Appium version explicitly: latest may point to a version without the Flutter Integration Driver.
Ask anything about the TestingBot documentation: frameworks, the REST API, the device cloud, the tunnel and more. For help from our team, email info@testingbot.com.