How to run integration tests for iOS

222 views
Skip to first unread message

Ali Akhtar

unread,
Feb 4, 2021, 3:47:41 PM2/4/21
to Flutter Development (flutter-dev)

As a non-swift developer, I'm having trouble understanding the documentation for running integration tests at https://pub.dev/packages/integration_test#ios-device-testing :

- Where is 'iOS/Podfile' located?

- Do I need to create the file 'RunnerTests.m' myself? If so where should I put this file? I'm guessing it will need to contain the code given in the docs?

- How do I 'start RunnerTests' to kick-off integration tests?

- Is there a way to run these tests on Firebase test lab? There's documentation for doing this on Android devices but nothing for iOS devices.

Ali Akhtar

unread,
Feb 8, 2021, 5:12:04 PM2/8/21
to Flutter Development (flutter-dev)
Bump. Are iOS tests not supported on Firebase test lab?

Ed

unread,
Mar 16, 2021, 11:00:14 AM3/16/21
to Flutter Development (flutter-dev)
Has anyone successfully run tests with the new integration_test wrapper on an iOS simulator?

I have gotten them to build (CL, with Firestore/base), deploy, launch, isolate; but the test process fails to parse a response? and can not complete the connection handshake:  "FormatException:... No requestData Extension registered"

I've tried CL simulator and simulators launched from AStudio and XCode (although I'm pretty newb to the latter), all with same result.  Same tests run fine on Windows PC and were shared to Mac OS via GitHub.

TIA, 
Ed
{environment details available upon request}

Ed Fowler

unread,
Mar 19, 2021, 12:17:18 PM3/19/21
to Flutter Development (flutter-dev)
Update:  Additional steps required when moving Firestore app to iOS build from Windows/Android:

1.  Make sure GoogleService-Info.plist downloaded from Firebase iOS app is added (not referenced) to Runner\Runner folder via XCode.

2.  Error: 'CocoaPods could not find compatible versions for pod "cloud_firestore" =>'
      Fix: Modify 'platform' In ios/Podfile file:
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
platform :ios, '10.0'

Integration tests now run via command line:
flutter drive --driver=test_driver/int_driver.dart --target=integration_test/int_test.dart

or in VS Code, if directory conventions are followed:
VSCode.png
Reply all
Reply to author
Forward
0 new messages