我正在使用Fastlane来构建和测试我的ObjC项目 . 我使用 scan 操作来运行单元测试用例和 slather 操作来生成代码覆盖率报告 . 我能够使用slather动作生成cobertura.xml报告,但无法将报告发布到SonarQube .
我正在使用SonarQube 6.4和fastlane 2.64.0 .
FastFile
scan(
workspace: "Sample.xcworkspace",
scheme: "SampleTests",
code_coverage: true,
output_types: "html"
)
slather(
cobertura_xml: true,
output_directory: "./reports",
proj: "Sample.xcodeproj",
workspace: "Sample.xcworkspace",
scheme: "SampleTests",
)
sonar
分析已发布到Sonar,但代码覆盖率报告未更新 . 请让我知道我错过钥匙的地方 .
1 回答
根据您对问题的评论,您似乎还没有尝试配置报告的路径,因此很自然不会导入任何覆盖数据 . 分析无法直观地报告或应该阅读报告 .
话虽如此,您还表明您正在生成
cobertura.xml
文件,但这不是currently supported by SonarCFamily for Objective-C格式之一 . 因此,您需要将覆盖数据放入Generic Coverage format,然后使用sonar.coverageReportPaths
分析属性包含该报告的路径 .