You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Xcode 15下Bazel iOS测试失败问题排查求助

Xcode 15 下 Bazel iOS 测试报错问题排查

问题背景

  • 测试环境:Xcode 15,运行 Bazel iOS 测试
  • 异常现象:该测试在 Xcode 14.3.1 中可正常通过,但在 Xcode 15 中触发如下错误:
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.

问题分析与结论

是的,xctestrun.py 生成的文件命名为 xctestrun.plist、缺少标准 .xctestrun 后缀,很大概率就是导致该报错的原因

原因如下:

  • Xcode 15 对测试运行文件的后缀校验规则比 Xcode 14.3.1 更严格
  • Xcode 15 版本的 xcodebuild 会强制校验文件类型,仅识别后缀为 .xctestrun 的文件或 xctestproducts bundle 作为合法的测试运行载体,而 Xcode 14.3.1 对后缀的限制相对宽松,允许 .plist 后缀的同名文件通过校验

解决方案

修改 xctestrun.py 的生成逻辑,将输出文件命名为带有 .xctestrun 后缀的格式(例如 YourTestTarget.xctestrun),替换原有的 xctestrun.plist 命名方式。

内容的提问来源于stack exchange,提问作者Steven Hepting

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.10 10:32:02