Sonar Qube Integration Tests + Unit Tests Report

121 views
Skip to first unread message

Kishore Polisetty

unread,
Oct 31, 2017, 10:05:28 PM10/31/17
to SonarQube
Hi Team,

I am looking for a solution. I need help in below Use Case. Ours is a JavaScript Project.

Use Case: 
  • We have unit tests located in development repository and functional / integration tests located in another repository.
  • Unit tests are running as part of while building the application. Functional / Integration tests are running on a deployed application (QA Environment / QA Box).
  • After unit tests execution, we push coverage numbers to sonar. We can see coverage numbers in sonar under Coverage section. We used this property sonar.javascript.lcov.reportPath in sonar.properties file for pushing coverage to sonar.
  • After functional tests execution, we push coverage numbers to sonar. We can see coverage numbers in sonar under IT Coverage section. We used this property sonar.javascript.lcov.itReportPath in sonar.properties file for pushing coverage to sonar. It is overwriting the existing coverage numbers of unit tests in sonar. Now I can see only Integration tests coverage numbers.

Note: If I use sonar.javascript.lcov.reportPath & sonar.javascript.lcov.itReportPath in same sonar.properties file. I can see both numbers in sonar.

If I push numbers for unit tests separately & for integration tests separately, then I cant see both unit & IT numbers in sonar. 

Is there any way that not to update already existing unit test numbers in sonar, when we push only integration test report. (or) vice versa??

Thanks,
Kishore


G. Ann Campbell

unread,
Nov 1, 2017, 8:05:23 AM11/1/17
to SonarQube
Hi Kishore,

You cannot update an existing analysis, you can only replace it with a new one. You'll need to run all your tests before analysis and pass them in together.


Ann

Kishore Polisetty

unread,
Nov 11, 2017, 9:11:47 AM11/11/17
to SonarQube
Thank you Ann.
Reply all
Reply to author
Forward
0 new messages