Domanda

I have a project with modules A, B, C and D. There are unit tests in all these modules.

However, there are (currently) no integration tests in module A.

  • The IT coverage (which takes into account all modules) is roughly 15%.
  • The UT coverage (which takes into account all modules) is roughly 35%.
  • The overall coverage in the IT coverage widget (which for some reason takes into account only the modules with IT's, namely B, C and D) is roughly 70%.

According to the official Sonar docs, the overall coverage is supposed to be the combined coverage of IT's and UT's, i.e. overall coverage <= [IT coverage + UT coverage].

This condition is obviously violated by the above overall coverage of 70%. Since the overall coverage only takes into account modules B,C and D, (which have an overall coverage of roughly 70%), the calculated coverage is correct (for these 3 modules).

How can I tell Sonar to consider all modules (also those without integration tests) in the calculation of the overall coverage such that I have a meaningful overall coverage metric?

È stato utile?

Soluzione

This is a known issue. Feel free to follow and vote for http://jira.codehaus.org/browse/SONARJAVA-114

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top