Supply information for "Covered by the following tests"

27 views
Skip to first unread message

markus....@gmail.com

unread,
May 5, 2018, 10:54:15 AM5/5/18
to SonarQube
Hi,

I'm writing a plugin for a language and I'm already computing test coverage for files.

When I'm looking into SonarQube after I ran the analasys, I can see a green bar on the side for covered lines and when I click on that I see:

Covered by the following tests
There is no extra information about test files.


I'm computing the coverage and save it via:

context
   
.newCoverage()
   
.onFile(inputFile)
   
.lineHits(line, coverage)
   
.save();



I do have enough information to be able to add the tests covering the line, but I'm not sure how to do so.

Is there no API for that yet or am I missing something?

Thanks in advance :-)

nicolas...@sonarsource.com

unread,
May 7, 2018, 2:58:08 AM5/7/18
to SonarQube
Hi there,

On the API front looks like you could check out CoverageBlock , however most importantly you should know that features around 'test execution details' haven't received any update since a while and are now deprecated (SONAR-7619). All in all not sure this is worth further investments on your side.

Best regards,
Nicolas
Reply all
Reply to author
Forward
0 new messages