Hi,
I am using SonarQube’s VSTS extensions to trigger the builds. I am building angular projects which have its respective test cases for TypeScript and JavaScript.
SonarQuber Version: 6.7.5
TFS - 2017 Update3
It display the coverage and test results on vsts successfully but displays different coverage results on sonarqube server. On VSTS/TFS build summary to display codecoverage results we have used Cobertura tool and it displays 64.46% for branches and 94.18% for lines but on SonarQube server it displays around 87.7% using lcov file and after clicking on it displays overall coverage where it displays Condition Coverage as 64.5% which is near to branch coverage displayed in VSTS summary.
So is it because we are displaying the result using different formats like Cobertura for TFS build and lcov for Sonar or there is something that i am missing in my configuration properties for sonar?
Also how can I display the test result on SonarQube which are displayed in TFS build summary?
I have attached snapshot of the same and also the additional properties that i have used in TFS build task for sonar.
Overall coverage on sonarserver
Additional properties passed in Prepare Analysis Configuration task of sonar in TFS build
# Additional properties that will be passed to the scanner, **
# Put one key=value per line, example:
# sonar.exclusions=/*.bin
#sonar.javascript.lcov.reportPaths=coverage/lcov.info
#sonar.exclusions=node_modules/**
sonar.sources=src
sonar.sourceEncoding=UTF-8
sonar.exclusions=/node_modules/,/.spec.ts**
sonar.tests=src
sonar.test.inclusions=/.spec.ts**
sonar.typescript.tslint.configpath=tslint.json
sonar.exclusions=/node_modules/,/.spec.ts,src/Tools/***
sonar.typescript.lcov.reportPaths=coverage/lcov.info
sonar.javascript.lcov.reportPaths=coverage/lcov.info
sonar.typescript.exclusions=/node_modules/,/typings.d.ts,/main.ts,/environments/environment*.ts,*/routing.module.ts
Thanks & regards,
SRP