04-15-2021 7:54 AM
We have recently started looking into using Sonar to provide quality metrics also for ABAP code. (Being a Java-oriented organization, we have been doing this for years for Java already.) This works more or less neatly, although we're still figuring out how to automate the process between Git update and Sonar analysis. But that's not my topic.
Sonar does not perform code coverage analysis by itself, but it will display test coverage if data is fed data from external tools such as JaCoCo or Cobertura, or in a Sonar-specific format called "generic test data" (https://docs.sonarqube.org/latest/analysis/generic-test/).
And finally, my question: has anybody managed to perform this for ABAP Unit? I.e. produce data out of the ABAP Coverage Analyzer in one of the mentioned formats, so that it can be displayed by Sonar?
Regards
Rainer
04-15-2021 9:52 AM
04-15-2021 3:53 PM
c5e08e0478aa4727abc4482f5be390b2: thanks for the hint, but I don't think the issues (or solutions) are related.
In the meantime, I've had a deeper look at the Coverage API, which is a thing of beauty in its own right, but only allows accessing coverage results as totals at the class/program/function level (IF_SCV_RESULT, IF_SCV_COVERAGE), whereas Sonar wants the coverage by individual line of code. This information is stored in blobs in the database, and there's no official access mechanism that I could find.