我正在使用Fastlane来构建和测试我的ObjC项目。我使用扫描操作来运行单元测试用例,并使用补充操作来生成代码覆盖报告。我能够使用slather操作生成cobertura.xml报告,但无法将报告发布到SonarQube。
我使用的是SonarQube 6.4和Fastlan2.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,但代码覆盖率报告没有更新。请让我知道我在哪里错过了钥匙。
发布于 2018-01-11 13:45:48
从您对问题的评论来看,您似乎还没有尝试配置报表的路径,因此没有导入覆盖率数据是很自然的。分析不能直观地知道报告在哪里,或者应该阅读它们。
尽管如此,您还表明您正在生成一个cobertura.xml文件,但这不是目前由SonarCFamily为目标C提供支持格式之一。因此,您需要将覆盖范围数据输入到通用覆盖格式中,然后使用sonar.coverageReportPaths分析属性包含到该报告的路径。
https://stackoverflow.com/questions/48199990
复制相似问题