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
0a668b98
Unverified
Commit
0a668b98
authored
Jan 22, 2021
by
Romain Rastel
Committed by
GitHub
Jan 22, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add details to the iOS part integration_test (#74428)
parent
550a85da
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
1 deletion
+33
-1
README.md
packages/integration_test/README.md
+33
-1
No files found.
packages/integration_test/README.md
View file @
0a668b98
...
...
@@ -182,8 +182,10 @@ devices you want to test on. See
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`
.
Change the
`Product Name`
to
`RunnerTests`
. Make sure
`Target to be Tested`
is set to
`Runner`
and language is set to
`Objective-C`
.
Select
`Finish`
.
Under
**Runner**
>
**Info**
>
**Configurations**
section, make sure, that
`Runner`
and
`RunnerTests`
have the same value under each configuration.
Make sure that the
**iOS Deployment Target**
of
`RunnerTests`
within the
**Build Settings**
section is the same as
`Runner`
.
Add the new test target to
`ios/Podfile`
by embedding in the existing
`Runner`
target.
...
...
@@ -217,3 +219,33 @@ To build `integration_test/foo_test.dart` from the command line, run:
# Pass --simulator if building for the simulator.
flutter build ios integration_test/foo_test.dart
```
To deploy it to Firebase Test Lab you can follow these steps:
Execute this script at the root of your Flutter app:
```
sh
output
=
"../build/ios_integ"
product
=
"
$output
/Build/Products"
dev_target
=
"14.3"
# Pass --simulator if building for the simulator.
flutter build ios integration_test/foo_test.dart
-release
pushd
ios
xcodebuild
-workspace
Runner.xcworkspace
-scheme
Runner
-config
Flutter/Release.xcconfig
-derivedDataPath
$output
-sdk
iphoneos build-for-testing
zip
-r
"
$output
/ios_tests.zip"
"
$product
/Release-iphoneos"
"
$product
/Runner_iphoneos
$dev_target
-arm64.xctestrun"
popd
```
You can verify locally that your tests are succesful by running the following command:
```
sh
xcodebuild test-without-building
-xctestrun
"build/ios_integ/Build/Products/Runner_iphoneos14.3-arm64.xctestrun"
-destination
id
=
<YOUR_DEVICE_ID>
```
Once everything is ok, you can upload the resulting zip to Firebase Test Lab (change the model with your values):
```
sh
gcloud firebase
test
ios run
--test
"build/ios_integ/ios_tests.zip"
--device
model
=
iphone11pro,version
=
14.1,locale
=
fr_FR,orientation
=
portrait
```
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