Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Support for Xcode 15 and iOS 17 #60

Open
aircraft-cerier opened this issue Jul 6, 2023 · 4 comments
Open

Add Support for Xcode 15 and iOS 17 #60

aircraft-cerier opened this issue Jul 6, 2023 · 4 comments

Comments

@aircraft-cerier
Copy link
Contributor

We are trying to use xctestrunner to run testing on iOS 17 devices with xcode 15.0

We are running into the follow errors when passing a command:
First when running the following command:
ios_test_runner --app_under_test_path ios-configurator.ipa --test_bundle_path ios-configurator-ui-tests.zip --work_dir ~/ios_test_runner_work_dir --test_type xcuitest test --id 00008020-001524340281002E

we get the following error regardless of what iOS our device is on:

Command line invocation:
    /Applications/Xcode15.0beta3.app/Contents/Developer/usr/bin/xcodebuild test-without-building -xctestrun ~/ios_test_runner_work_dir/TEST_ROOT/xctestrun.plist -destination id=00008020-001524340281002E -derivedDataPath /var/folders/6d/l0ggp9fj52g22q3x1ghl7bfh0000gq/T/tmp73pv379u -resultBundlePath /var/folders/6d/l0ggp9fj52g22q3x1ghl7bfh0000gq/T/tmp73pv379u/test.xcresult -collect-test-diagnostics=never

User defaults from command line:
    collect-test-diagnostics = never
    IDEBuildOperationResultBundlePath = /var/folders/6d/l0ggp9fj52g22q3x1ghl7bfh0000gq/T/tmp73pv379u/test.xcresult
    IDEDerivedDataPathOverride = /var/folders/6d/l0ggp9fj52g22q3x1ghl7bfh0000gq/T/tmp73pv379u
    IDEPackageSupportUseBuiltinSCM = YES

Writing result bundle at path:
	/var/folders/6d/l0ggp9fj52g22q3x1ghl7bfh0000gq/T/tmp73pv379u/test.xcresult

xcodebuild: error: Failed to build workspace temporary with scheme Transient Testing.: File is of an unsupported type; must be either an xctestrun file or xctestproducts bundle.

I am able to fix this issue by manually changing the name of the xctestrun.plist file to test.xctestrun and rerunning the command:
/Applications/Xcode15.0beta3.app/Contents/Developer/usr/bin/xcodebuild test-without-building -xctestrun ~/ios_test_runner_work_dir/TEST_ROOT/test.xctestrun -destination id=00008020-001524340281002E -derivedDataPath /var/folders/6d/l0ggp9fj52g22q3x1ghl7bfh0000gq/T/tmp73pv379u -resultBundlePath /var/folders/6d/l0ggp9fj52g22q3x1ghl7bfh0000gq/T/tmp73pv379u/test1.xcresult -collect-test-diagnostics=never

After doing this we run into another error:

Command line invocation:
   /Applications/Xcode15.0beta3.app/Contents/Developer/usr/bin/xcodebuild test-without-building -xctestrun ~/ios_test_runner_work_dir/TEST_ROOT/test.xctestrun -destination id=00008020-001524340281002E -derivedDataPath /var/folders/6d/l0ggp9fj52g22q3x1ghl7bfh0000gq/T/tmp73pv379u -resultBundlePath /var/folders/6d/l0ggp9fj52g22q3x1ghl7bfh0000gq/T/tmp73pv379u/test1.xcresult -collect-test-diagnostics=never

User defaults from command line:
    collect-test-diagnostics = never
    IDEBuildOperationResultBundlePath = /var/folders/6d/l0ggp9fj52g22q3x1ghl7bfh0000gq/T/tmpnp_tmxyg/test3.xcresult
    IDEDerivedDataPathOverride = /var/folders/6d/l0ggp9fj52g22q3x1ghl7bfh0000gq/T/tmpnp_tmxyg
    IDEPackageSupportUseBuiltinSCM = YES

Writing result bundle at path:
	/var/folders/6d/l0ggp9fj52g22q3x1ghl7bfh0000gq/T/tmpnp_tmxyg/test3.xcresult

Testing started
2023-07-06 16:21:39.428 xcodebuild[67560:380128] [MT] DVTDevice: Error locating DeviceSupport directory using Optional("arm64e") or Optional("arm64e"): nilError
2023-07-06 16:21:46.156 xcodebuild[67560:380128] [MT] IDETestOperationsObserverDebug: 11.913 elapsed -- Testing started completed.
2023-07-06 16:21:46.156 xcodebuild[67560:380128] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start
2023-07-06 16:21:46.156 xcodebuild[67560:380128] [MT] IDETestOperationsObserverDebug: 11.913 sec, +11.913 sec -- end

Test session results, code coverage, and logs:
	/var/folders/6d/l0ggp9fj52g22q3x1ghl7bfh0000gq/T/tmpnp_tmxyg/test3.xcresult

We do not run into this second error with iOS 16, only with iOS 17.

@tirodkar
Copy link
Collaborator

@me11kiy Mind looking into this. I think you might have hit this internally as well.

@me11kiy
Copy link
Collaborator

me11kiy commented Jul 19, 2023

@aircraft-cerier, we've seen the issue with xctestrun file and fixed it with using xctestrun extension too. if you have a PR for that - please send it.
As for the second error - yes, I don't see iOS 17 device support under /Applications/Xcode_15.0.0_beta_4.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/. Unfortunately I don't currently have a real device with iOS 17. This discussion suggests it should just work. Are you seeing the same error with beta 4?

@keith
Copy link
Contributor

keith commented Aug 23, 2023

should be fixed at HEAD, please test and report back!

@aircraft-cerier
Copy link
Contributor Author

All good now, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants