tree: 4dd3fafab62e91f01a46e739f7017d6ab1d6ab9b [path history] [tgz]
  1. App/
  2. IosUnitTests.xcodeproj/
  3. Tests/

iOS Unit Tests

These are the unit tests for iOS engine. They can be executed locally and are also run in LUCI builds.

Running Tests

To build and run the iOS tests, run the following script from the src directory:

flutter/testing/ --type=objc

After the ios_test_flutter target is built you can also run the tests inside of Xcode with testing/ios/IosUnitTests/IosUnitTests.xcodeproj.

When you load the test project IosUnitTests.xcodeproj into XCode after running, only a few basic tests will appear initially. You have to run the test suite once in XCode for the rest to appear. Select “iPhone 8” as the device, and press command-u to start all the tests running. Once the tests are done running, the tests that ran will appear in the sidebar, and you can pick the specific one you want to debug/run.

If you modify the test or under-test files, you'll have to run again.

Adding Tests

When you add a new unit test file, also add a reference to that file in shell/platform/darwin/ios/, under the sources list of the ios_test_flutter target. Once it's there, it will execute with the other tests.