Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying ABAP Unit coverage in Sonar

r_lindemann
Explorer

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

2 REPLIES 2

abo
Active Contributor
0 Kudos

Could this be useful?

r_lindemann
Explorer

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.