【问题标题】:Unable to export test result in Xcode 11.4无法在 Xcode 11.4 中导出测试结果
【发布时间】:2020-08-16 01:22:04
【问题描述】:

我正在使用以下代码使用 Xcode11.4 导出测试代码覆盖率。

./xccov-to-sonarqube-generic.sh /DerivedData/MyApp-*/Logs/Test/*.xcresult/ > sonarqube-generic-coverage.xml

我收到以下错误

此版本的 Xcode 不支持打开创建的结果包 使用 v1 API 的 Xcode 和 xcodebuild 版本

请帮助我正确的方法。

【问题讨论】:

  • 我也遇到了同样的问题,运气好吗?
  • 找到了一种使用 XCParse 的方法,还没有尝试过,它将 XCResult 转换为 Xcode 10 xccovarchive。现在我在分析步骤中添加了 try catch 以通过
  • 让它在路径 (*) 中没有通配符的情况下工作。不知道为什么难。

标签: ios xcode sonarqube fastlane xcode11.4


【解决方案1】:

就我的研究而言,这里有 3 种解决方法:

  1. Xcode 11+ 的 xccov-to-sonarqube-generic.sh 脚本有更新。试试这个

https://github.com/SonarSource/sonar-scanning-examples/blob/master/swift-coverage/swift-coverage-example/xccov-to-sonarqube-generic.sh

  1. 使用代码覆盖率转换器 (cococo) 实用程序生成声纳的 xml 文件格式。更多信息请参考:

https://medium.com/monsterculture/cococo-code-coverage-converter-from-xcode-11-to-sonarqube-7f48cff97b9b

  1. 任何能够将 Xocde 11+ *.xcresult 文件转换为声纳的 xml 文件格式的 shell 脚本

【讨论】:

    猜你喜欢
    • 2020-05-28
    • 2011-06-10
    • 1970-01-01
    • 1970-01-01
    • 2020-07-25
    • 1970-01-01
    • 1970-01-01
    • 2015-05-02
    • 1970-01-01
    相关资源
    最近更新 更多