OS: windows 10
SonarQube: v10.3
SonarScanner: v5.0.1
Jest: v29
casualbot/jest-sonar-reporter : 2.2.5
Sonar deployed from zip
I’d like to see the number of executed tests.
Jest config
"jest":{
"coverageDirectory": "coverage",
"coverageReporters": [
"lcov"
],
"reporters": [
"default",
"@casualbot/jest-sonar-reporter"
]
},
"@casualbot/jest-sonar-reporter": {
"uniqueOutputName": "false",
"usePathForSuiteName": "true",
"relativePaths": "true",
"outputdirectory": "coverage"
}
test-c.zip (260.6 KB)
coverage/
src/
sourse/sum.ts
test/sum.test.ts
18:17:08.478 INFO: Sensor Generic Test Executions Report
18:17:08.479 INFO: Parsing C:\GitHub\test-sonar\coverage\jest-sonar.xml
18:17:08.504 INFO: Imported test execution data for 0 files
18:17:08.505 INFO: Test execution data ignored for 1 unknown files, including:
sum.test.ts
18:17:08.506 INFO: Sensor Generic Test Executions Report (done) | time=27ms
fulllog.txt (58.9 KB)
sonar-scanner^
-X^
-D"sonar.projectBaseDir=src"^
-D"sonar.projectKey=test-c"^
-D"sonar.sources=sources"^
-D"sonar.test=test"^
-D"sonar.test.inclusions=test/*.test.ts"^
-D"sonar.host.url=http://localhost:9000"^
-D"sonar.token=sqp_49ae8893eb3e2b7ccb928ae7a3d198888afb028d"^
-D"sonar.typescript.lcov.reportPaths=coverage/lcov.info"^
-D"sonar.testExecutionReportPaths=coverage/jest-sonar.xml"^
report what i’ve tried
<testExecutions version="1">
<file path="src\test\sum.test.ts">
<testCase name="sum module adds 1 + 2 to equal 3" duration="3"/>
</file>
</testExecutions>
<testExecutions version="1">
<file path="test\sum.test.ts">
<testCase name="sum module adds 1 + 2 to equal 3" duration="3"/>
</file>
</testExecutions>
<testExecutions version="1">
<file path="sum.test.ts">
<testCase name="sum module adds 1 + 2 to equal 3" duration="3"/>
</file>
</testExecutions>
What have tried
- Configured sonar and jest
- execute the sonar scanner with proper configuration
- Investigate already opened topics
- investigate GitHub Issues