Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view


Jorge Costa

Following the discussion on this thread. and extending it to everyone on sonar side

I want to ask a few questions about coverage in sonar.

First the things ive found when implementing this parser.
1. Branch coverage by line is ignored by sonar if there isn't a line hit before. This was the main problem with my parser. So adding a line hit to each condition solved the problem. Maybe sonar core api can be updated to automatically add a line hit for each condition hit?

2. The current implementation of condition coverage sets, total conditions and total covered conditions. Then shows in sonar (1/2) (2/4) etc. This is not very informative since we don't know which condition have been evaluated true or false.

3. Sonar only has line coverage and branch coverage. There are several studies ( where line coverage in particular is questioned about its real value. In this specific case, bullseye reports provides only function coverage and then elaborates and provides additional decision and condition. This 3 metrics provide all we need to know about the covered paths in our code. My question is, if there is a possibility to provide also FUNCTION coverage metric that can be use in isolation or in conjunction with LINE coverage.

4. Following the previous comment, it would be nice to have the decision coverage.

5. Finally the main statistics shows branch coverage. We are then adding condition coverage to the project. Should this be updated to reflect condition coverage.

Waleri i want to propose a patch for the bullseye plugin, ive updated the existent one to include unit test, integration test and complexity calculation based on bullseye coverage. The calculation of complexity is based on bullshtml modified for the purpose.bullseyepatchwithcomplexityandintegrationcoverage.patch

thanks in advance

Jorge Costa

Best Regards
Jorge Costa