Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否有用于 Clover 插件的 API,以便能够以 JSON 或类似的方式检索覆盖率统计信息?
Jenkins Api 能否用于获取三叶草覆盖率报告。看起来 Cobertura 是可能的,但找不到三叶草的任何东西。
不幸的是,Jenkins Clover 插件没有公开任何 REST API。您可以尝试做的是编写一个插件,该插件将通过 REST 公开 clover.xml 文件的内容。如果您只对覆盖摘要感兴趣(即不是每个源代码行的覆盖),那么您还可以阅读构建结果元数据。Clover Plugin 已经解析了 clover.xml 文件并存储了覆盖率。看:
https://github.com/jenkinsci/clover-plugin/blob/master/src/main/java/hudson/plugins/clover/CloverPublisher.java#L196