Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
86120659
Unverified
Commit
86120659
authored
Dec 07, 2020
by
Jenn Magder
Committed by
GitHub
Dec 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update integration_test README for iOS (#71859)
parent
9a31c39a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
17 deletions
+24
-17
README.md
packages/integration_test/README.md
+24
-17
No files found.
packages/integration_test/README.md
View file @
86120659
...
...
@@ -180,33 +180,40 @@ devices you want to test on. See
## iOS Device Testing
You need to change
`iOS/Podfile`
to avoid test target statically linking to the plugins. One way is to
link all of the plugins dynamically:
Open
`ios/Runner.xcworkspace`
in Xcode. Create a test target if you
do not already have one via
`File > New > Target...`
and select
`Unit Testing Bundle`
.
Change the
`Product Name`
to
`RunnerTests`
. Make sure
`Target to be Tested`
is set to
`Runner`
.
Select
`Finish`
.
Add the new test target to
`ios/Podfile`
by embedding in the existing
`Runner`
target.
```
target 'Runner' do
use_frameworks!
# Do not change existing lines.
...
end
```
To run
`integration_test/foo_test.dart`
on your iOS device, rebuild your iOS
targets with Flutter tool.
```
sh
# Pass --simulator if building for the simulator.
flutter build ios integration_test/foo_test.dart
target 'RunnerTests' do
inherit! :search_paths
end
end
```
Run
`flutter build ios`
from your project file to hook up the new settings.
Open Xcode project (by default, it's
`ios/Runner.xcodeproj`
). Create a test target
(navigating
`File > New > Target...`
and set up the values) and a test file
`RunnerTests.m`
and
change the code. You can change
`RunnerTests.m`
to the name of your choice.
In Xcode, add a test file called
`RunnerTests.m`
(or any name of your choice) to the new target and
replace the file:
```
objective-c
#import <XCTest/XCTest.h>
#import <integration_test/IntegrationTestIosTest.h>
@import XCTest;
@import integration_test;
INTEGRATION_TEST_IOS_RUNNER(RunnerTests)
```
Now you can start RunnerTests to kick-off integration tests!
Run
`Product > Tests`
to run the integration tests on your selected device.
To build
`integration_test/foo_test.dart`
from the command line, run:
```
sh
# Pass --simulator if building for the simulator.
flutter build ios integration_test/foo_test.dart
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment