- CI system used: Travis CI
- Languages of the repository: Javascript and Typescript
- Error observed:
After configuring jest and sonar-project.properties, the PR with the changes show No coverage information either of the PR (to be expected) or for the estimated coverage after merge.
When checking the logs I found the following things:
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: ‘sonar.coverage.jacoco.xmlReportPaths’ is not defined. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
…
INFO: Parsing /home/travis/…/test-report.xml
INFO: Imported test execution data for 4 files
INFO: Sensor Generic Test Executions Report (done) | time=80ms
…
INFO: ------------- Run sensors on project
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=2ms
I can’t seem to find any logs related to sonar.javascript.lcov.reportPaths
My configuration is as follows:
jest.config.js
“collectCoverage”: true,
“collectCoverageFrom”: [
“src/**/*.(tsx|ts)”
],
“testResultsProcessor”: “jest-sonar-reporter”,
sonar-project.properties
sonar.javascript.lcov.reportPaths=./coverage/lcov.info
sonar.testExecutionReportPaths=test-report.xml
sonar.tests=src
If someone could lend a hand I would really appreciate it.
Thanks,
Meyer