Skip to content

Commit

Permalink
Bringing integration tests back to life
Browse files Browse the repository at this point in the history
* Updated default iOS test device from iphone8/12 to iphone13pro/15.7 (#2366)
  FTL recently deprecated iphone8/12, so integration tests have been
  failing
* Updated local copy of FTL catalog to recent version
* Replaced iOS integration test app EarlGreyExample with FlankExampleTest
  EarlGreyExample is failing on newer OS/xcode. Current copy is based on
  EarlGreyExample v1, which is no longer maintained. V2 is pretty hard
  to get up and running, so switching to FlankExampleTest is the easiest
  way to unblock integration tests.
  • Loading branch information
Fry-kun authored Apr 27, 2023
1 parent f31dd9d commit 546a181
Show file tree
Hide file tree
Showing 22 changed files with 232 additions and 289 deletions.
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ gcloud:
## This flag may be repeated to specify multiple devices.
## The four device dimensions are: model, version, locale, and orientation.
# device:
# - model: iphone8
# version: 12.0
# - model: iphone13pro
# version: 15.7
# locale: en
# orientation: portrait
# - model: iphonex
Expand Down
4 changes: 2 additions & 2 deletions integration_tests/src/test/kotlin/integration/DumpShardsIT.kt
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ class DumpShardsIT {
assertThat(shards.count()).isEqualTo(2)

shards.first().values.flatten().let { firstShard ->
assertThat(firstShard.count()).isEqualTo(8)
assertThat(firstShard).contains("EarlGreyExampleSwiftTests/testWithCustomFailureHandler")
assertThat(firstShard.count()).isEqualTo(2)
assertThat(firstShard).contains("FlankExampleTests/test2")
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class LegacyResultIT {
val testSuiteOverview = outputReport.firstTestSuiteOverview

testSuiteOverview.assertTestCountMatches(
total = 17,
total = 4,
skipped = 0
)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
gcloud:
test: ../test_runner/src/test/kotlin/ftl/fixtures/tmp/ios/EarlGreyExample/EarlGreyExample.zip
xctestrun-file: ../test_runner/src/test/kotlin/ftl/fixtures/tmp/ios/EarlGreyExample/EarlGreyExampleSwiftTests.xctestrun
test: ../test_runner/src/test/kotlin/ftl/fixtures/tmp/ios/FlankExample/FlankExample.zip
xctestrun-file: ../test_runner/src/test/kotlin/ftl/fixtures/tmp/ios/FlankExample/FlankExample.xctestrun
flank:
test-targets:
- nonExisting/Class
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
gcloud:
test: ../test_runner/src/test/kotlin/ftl/fixtures/tmp/ios/EarlGreyExample/EarlGreyExample.zip
xctestrun-file: ../test_runner/src/test/kotlin/ftl/fixtures/tmp/ios/EarlGreyExample/EarlGreyExampleSwiftTests.xctestrun
test: ../test_runner/src/test/kotlin/ftl/fixtures/tmp/ios/FlankExample/FlankExample.zip
xctestrun-file: ../test_runner/src/test/kotlin/ftl/fixtures/tmp/ios/FlankExample/FlankExample.xctestrun

flank:
disable-sharding: false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
gcloud:
test: "../test_runner/src/test/kotlin/ftl/fixtures/tmp/ios/EarlGreyExample/EarlGreyExample.zip"
xctestrun-file: "../test_runner/src/test/kotlin/ftl/fixtures/tmp/ios/EarlGreyExample/EarlGreyExampleSwiftTests.xctestrun"
test: "../test_runner/src/test/kotlin/ftl/fixtures/tmp/ios/FlankExample/FlankExample.zip"
xctestrun-file: "../test_runner/src/test/kotlin/ftl/fixtures/tmp/ios/FlankExample/FlankExample.xctestrun"

flank:
output-report: json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ IosArgs
network-profile: null
results-history-name: null
# iOS gcloud
test: [0-9a-zA-Z\/_.-]*\/test_runner\/src\/test\/kotlin\/ftl\/fixtures\/tmp\/ios\/EarlGreyExample\/EarlGreyExample.zip
xctestrun-file: [0-9a-zA-Z\/_.-]*\/test_runner\/src\/test\/kotlin\/ftl\/fixtures\/tmp\/ios\/EarlGreyExample\/EarlGreyExampleSwiftTests.xctestrun
test: [0-9a-zA-Z\/_.-]*\/test_runner\/src\/test\/kotlin\/ftl\/fixtures\/tmp\/ios\/FlankExample\/FlankExample.zip
xctestrun-file: [0-9a-zA-Z\/_.-]*\/test_runner\/src\/test\/kotlin\/ftl\/fixtures\/tmp\/ios\/FlankExample\/FlankExample.xctestrun
xcode-version: null
device:
- model: iphone8
version: 13.6
- model: iphone13pro
version: 15.7
locale: en
orientation: portrait
num-flaky-test-attempts: 0
Expand Down
4 changes: 2 additions & 2 deletions test_projects/ios/EarlGreyExample/flank.ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ gcloud:
test: ./earlgrey_example.zip
xctestrun-file: ./dd_tmp/Build/Products/EarlGreyExampleSwiftTests_iphoneos13.4-arm64e.xctestrun
device:
- model: iphone8
version: 12.0
- model: iphone13pro
version: 15.7
orientation: portrait
locale: en_US
4 changes: 2 additions & 2 deletions test_runner/flank.ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ gcloud:
## This flag may be repeated to specify multiple devices.
## The four device dimensions are: model, version, locale, and orientation.
# device:
# - model: iphone8
# version: 12.0
# - model: iphone13pro
# version: 15.7
# locale: en
# orientation: portrait
# - model: iphonex
Expand Down
4 changes: 2 additions & 2 deletions test_runner/src/main/kotlin/ftl/config/FtlConstants.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ object FtlConstants {
const val localhost = "http://localhost:8080"
const val defaultLocale = "en"
const val defaultOrientation = "portrait"
const val defaultIosModel = "iphone8"
const val defaultIosVersion = "13.6"
const val defaultIosModel = "iphone13pro"
const val defaultIosVersion = "15.7"
const val defaultAndroidModel = "NexusLowRes"
const val defaultAndroidVersion = "28"
const val defaultIosConfig = "./flank.ios.yml"
Expand Down
Loading

0 comments on commit 546a181

Please sign in to comment.