[xcodeproj] Running UI test from Xcode
Opened this issue · 3 comments
Hi all!
I have a question regarding running UI tests from Xcode IDE (xcodeproj
generated project).
Q : Is it currently supported running UI tests from Xcode IDE with xcodeproj
generated projects?
I added the following changes to the rules_ios repo to try out including SimpleTest
ios_ui_test
rule into one of the xcode projects
commit eb3dd70ef1282508d03547ea715008e4667bbecf
Author: Yongjin Cho
Date: Thu Feb 17 12:55:40 2022 -0800
Update
diff --git a/BUILD.bazel b/BUILD.bazel
index f9d33e1..de29ea4 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -135,10 +135,12 @@ xcode_version(
xcode_config(
name = "host_xcodes",
- default = ":version12_5_1_12E507",
+ # default = ":version12_5_1_12E507",
+ default = ":version13_1_0_13A1030d",
versions = [
":version12_2_0_12B45b",
":version12_5_1_12E507",
+ ":version13_1_0_13A1030d",
],
visibility = ["//visibility:public"],
)
@@ -158,11 +160,26 @@ xcode_version(
version = "12.5.1.12E507",
)
+xcode_version(
+ name = "version13_1_0_13A1030d",
+ aliases = [
+ "13.1.0.13A1030d",
+ "13.1",
+ ],
+ default_ios_sdk_version = "15.0",
+ default_macos_sdk_version = "12.0",
+ default_tvos_sdk_version = "15.0",
+ default_watchos_sdk_version = "8.0",
+ version = "13.1.0.13A1030d",
+)
+
available_xcodes(
name = "host_available_xcodes",
- default = ":version12_5_1_12E507",
+ # default = ":version12_5_1_12E507",
+ default = ":version13_1_0_13A1030d",
versions = [
":version12_5_1_12E507",
":version12_2_0_12B45b",
+ ":version13_1_0_13A1030d",
],
)
diff --git a/tests/ios/ui-test/BUILD.bazel b/tests/ios/ui-test/BUILD.bazel
index 14ac080..d979a77 100644
--- a/tests/ios/ui-test/BUILD.bazel
+++ b/tests/ios/ui-test/BUILD.bazel
@@ -7,6 +7,7 @@ ios_ui_test(
],
minimum_os_version = "11.0",
test_host = True,
+ visibility = ["//visibility:public"],
)
ios_ui_test(
@@ -16,4 +17,5 @@ ios_ui_test(
],
minimum_os_version = "11.0",
test_host = "//tests/ios/ui-test/test-app-host:TestAppHost",
+ visibility = ["//visibility:public"],
)
diff --git a/tests/ios/xcodeproj/BUILD.bazel b/tests/ios/xcodeproj/BUILD.bazel
index ccd2fb6..b2f0a21 100644
--- a/tests/ios/xcodeproj/BUILD.bazel
+++ b/tests/ios/xcodeproj/BUILD.bazel
@@ -23,6 +23,7 @@ xcodeproj(
deps = [
"//tests/ios/frameworks/objc:ObjcFramework",
"//tests/ios/frameworks/objc:ObjcFrameworkTests",
+ "//tests/ios/ui-test:SimpleTest",
],
)
But as a result, no scheme was created for SimpleTest
. I was able to run the SimpleTest
successfully from the command line though.
@jerrymarino Given your activity on xcodeproj related issues, can you take a look on this issue and see if this is an actual issue in rules_ios or it's just an user error?
@yongjincho92 did similar changes but without changing the Xcode version and I see that target there
Do you mind testing that on the latest version of the rules? Maybe consider undoing the Xcode version changes to see if it's related?
FWIW, it shows up for me with the changes above but it won't actually build+run/attach/etc. to the test in Xcode. I'm going to pick up work on #520 to hopefully get this solved. 👍