REST API Jenkins API

Is there an API for the Clover plugin to get coverage statistics in JSON or something similar?

Can Jenkins Api be used to report clover coverage? It seems that this is possible with Cobertura, but cannot find anything for clover.

+4
source share
1 answer

Unfortunately, the Jenkins Clover plugin does not provide any REST API. What you could try to do is write a plugin that will expose the contents of the clover.xml file through REST. If you are only interested in a coverage summary (i.e. Not for coverage for each individual source line), you can also read the metadata of the assembly results. The Clover plugin already parses the clover.xml file and retains% coverage. Cm:

https://github.com/jenkinsci/clover-plugin/blob/master/src/main/java/hudson/plugins/clover/CloverPublisher.java#L196

0
source

Source: https://habr.com/ru/post/1524302/


All Articles