Reputation: 659
I have a maven project with modules in both Java and Javascript. I am not seeing the Javascript unit test files in test report in SonarQube but only Java unit test files. coverage_reports
In coverage_reports
folder I have cobertura-coverage.xml
created by Jest.
Is this sonar.javascript.jstest.reportPaths
still used or has it been replaced by some other configuration. We are using Sonarqube 6.7 at our server.
Edit:
For others to know, I used jest-sonar-reporter
and test script as
"test": "cross-env CI=true NODE_PATH=./src react-scripts test --env=jsdom --coverage --no-cache -u --testResultsProcessor jest-sonar-reporter"
This created a test report xml file that I used like this
<sonar.tests>src/test</sonar.tests>
<sonar.testExecutionReportPaths>path/to/test-report.xml</sonar.testExecutionReportPaths>
<sonar.javascript.lcov.reportPaths>path/to/lcov.info</sonar.javascript.lcov.reportPaths>
Upvotes: 0
Views: 2620
Reputation: 1090
As far as I can say sonar.javascript.jstest.reportPaths
doesn't exist (and never did).
There are 2 things (from question I'm not sure which one you need):
sonar.testExecutionReportPaths
property eventually).Finally, to see unit test files for JS, set correctly sonar.tests
property (Java test files are displayed due to smart enough maven scanner)
Upvotes: 1