Typescript, number of unit tests not displayed

hello,

I have a typescript project, all is good except the number of unit test that don’t appear on sonarqube.

-Sonar project language settings have a blank value cause we use the key in sonar-project.properties

-sonar-project.properties use this configuration :

sonar.sources=src/
sonar.exclusions=**/node_modules/**,**/*.spec.ts,src/test/**
sonar.tests=src
sonar.test.inclusions=**/*.spec.ts 
sonar.language=ts
sonar.ts.tslint.configPath=tslint.json
sonar.javascript.lcov.reportPaths=reports/unittest/lcov.info

-lcov.info file is generated with istanbuljs/nyc
nyc report --reporter=lcovonly

-Sonar-scanner use the lcov.info file

-Number of unit test is not displayed

Have you any idea to solve this problem ?

have a nice day,

Hi,

LCov reort are about test coverage. The count of unit tests would come from a test execution report.

And test execution reports aren’t directly supported for TypeScript. You would need to convert any such report to the Generic Test Execution format.

 
HTH,
Ann

Thanks, i missed this point.
All is good now.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.