Re: SonarQube - unity tests code coverage on new code not working

159 views
Skip to first unread message
Message has been deleted

G. Ann Campbell

unread,
Jan 25, 2016, 9:53:21 AM1/25/16
to SonarQube, jakub....@gmail.com
Please don't cross-post here and on StackOverflow.



On Monday, 25 January 2016 14:42:04 UTC+1,:

I am trying to do Sonar analysis with the unit tests code coverage on new code. When I do code coverage analysis with cobertura and do Sonar analysis the overall code coverage of the code is displayed correctly, however the code coverage of new code is not displayed.

Settings:

  • scm = Git
  • sonar.scm.disabled = false

I did following

  1. checked out earlier version of source code
  2. set Sonar project version to 1.0
  3. created Cobertura report (xml file)
  4. executed analysis and checked that the analysis was uploaded, the overal code coverage by unit tests was displayed correctly
  5. checked out latest version of source code
  6. set Sonar project version to 2.0
  7. executed analysis and checked that the analysis was uploaded, the overal code coverage by unit tests was displayed correctly

The overall code coverage of the code by unit tests got increased as I have implemented some unit tests on a code that was changed. The On New Code item in the widget however stays hidden and the code coverage of new code is not displayed.

Does any of you have any tips that could bring more light to this?

Thank you all.

Reply all
Reply to author
Forward
0 new messages