# Does sonar scanner require a test coverage report?

**URL:** <https://community.sonarsource.com/t/does-sonar-scanner-require-a-test-coverage-report/46074>\
**Category:** SonarQube Server / Community Build\
**Tags:** scanner\
**Created:** [July 7, 2021, 12:36pm UTC](https://community.sonarsource.com/t/does-sonar-scanner-require-a-test-coverage-report/46074 "2021-07-07T12:36:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeremy\_Brooks](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/jeremy_brooks/32/17905_2.png) [@Jeremy\_Brooks](https://community.sonarsource.com/u/Jeremy_Brooks)\
**Post date:** [July 7, 2021, 12:36pm UTC](https://community.sonarsource.com/t/does-sonar-scanner-require-a-test-coverage-report/46074/1 "2021-07-07T12:36:13Z")

</div>

SonarQube 8.9  
Scanner version 4.6.2

I’m trying to run a scan that simply does a code analysis, I would like to exclude the upload of a test coverage report.

I have successfully run the scanner after creating a test report. However this fails if the scanner cannot find a coverage report to upload. Is there anyway to tell the scanner to ignore test coverage and just do static code analysis?

---

<div class="post-metadata">

**Author:** ![Alexandre\_Gigleux](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/alexandre_gigleux/32/26_2.png) [@Alexandre\_Gigleux](https://community.sonarsource.com/u/Alexandre_Gigleux)\
**Post date:** [July 7, 2021, 1:01pm UTC](https://community.sonarsource.com/t/does-sonar-scanner-require-a-test-coverage-report/46074/2 "2021-07-07T13:01:22Z")

</div>

Hello,

I confirm it’s possible to just run the code scan part and it should not fail if a coverage report is not provided. This is actually the default behavior and what users do when they start with SonarQube and then only they configure their CI job to load coverage reports once they are satisfied with the static code analysis results.

Can you share some details about what you did to run your code scan?  
It would help if you could share the logs showing the failure you are facing.

Thanks  
Alex

---

<div class="post-metadata">

**Author:** ![Jeremy\_Brooks](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/jeremy_brooks/32/17905_2.png) [@Jeremy\_Brooks](https://community.sonarsource.com/u/Jeremy_Brooks)\
**Post date:** [July 7, 2021, 1:33pm UTC](https://community.sonarsource.com/t/does-sonar-scanner-require-a-test-coverage-report/46074/3 "2021-07-07T13:33:30Z")

</div>

Ah it takes a fresh brain sometimes to see the wood for the trees, you are correct, my sonar-project.properties file included the following 2 lines:

sonar.javascript.lcov.reportPaths=./coverage/lcov.info  
sonar.testExecutionReportPaths=./reports/test-report.xml

Once removed then all is running fine, thank you for pointing me back to check the configuration.
