Menu

#173 0% branch coverage due to wrong number of possible branches

open
nobody
None
5
2011-12-13
2011-12-13
Anonymous
No

When measuring code coverage in the Spring 3 Petclinic sample application I’ve found a totally unexpected 0% branch coverage metric. Reviewing the results in detail, it seems that on some ‘if’ constructs Cobertura has calculated 131072 (a -1 converted to unsigned??) possible branches and this has pulled down the branch metric to the minimum.
This is happening when using Cobertura Maven plug-in only, with Maven site and with Sonar 2.12.
Attached an excerpt of the generated cobertura.xml file. Complete file is 24 MB but I share it if needed.
Petclinic has been downloaded from trunk in SpringSource spring-samples Subversion repo here: https://src.springframework.org/svn/spring-samples/petclinic/

Discussion

  • Anonymous

    Anonymous - 2011-12-13

    Excerpt of generated coverage.xml showing 131072 possible branches in Owner class

     
  • Anonymous

    Anonymous - 2011-12-13
    • summary: 0% branch coverage due to wrong number of possible brances --> 0% branch coverage due to wrong number of possible branches
     

Log in to post a comment.