# PLSQL code coverage

**URL:** <https://community.sonarsource.com/t/plsql-code-coverage/141667>\
**Category:** Plugin Development\
**Tags:** sonarqube, coverage, scanner\
**Created:** [May 21, 2025, 5:53pm UTC](https://community.sonarsource.com/t/plsql-code-coverage/141667 "2025-05-21T17:53:40Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![felipebz](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/felipebz/32/32739_2.png) [@felipebz](https://community.sonarsource.com/u/felipebz)\
**Post date:** [May 22, 2025, 12:12am UTC](https://community.sonarsource.com/t/plsql-code-coverage/141667/3 "2025-05-22T00:12:00Z")

</div>

Hi,

In PowerShell, you need to wrap any argument values that include a dot (`.`) in double quotes or PowerShell can misinterpret them as property accessors.

This _should_ work:

> `.\utplsql.bat run system/pass@//localhost:1521/XEPDB1 -f=ut_coverage_sonar_reporter -o="coverage.xml" --coverage-schemes=SYSTEM -p=SYSTEM`

I say _should_ because generating this report properly can be tricky. The PL/SQL support from SonarQube commercial builds doesn’t have any native support for utPLSQL coverage reports, so the `coverage.xml` file must include the actual file paths for your PL/SQL sources. That’s where things get complicated.

To make that work, `utPLSQL-cli` has a [file-mapping config](https://www.utplsql.org/utPLSQL/develop/userguide/coverage.html#project-based-coverage), but it can be **very** complex, or even impossible, depending on how your source files are organized.

Even the [example from the utPLSQL project](https://github.com/utPLSQL/utPLSQL-demo-project/blob/develop/scripts/4_run_tests.sh) had an error and didn’t generate a valid report. The command arguments are overly complex. It could be [much simpler](https://github.com/felipebz/utPLSQL-demo-project/blob/develop/scripts/4_run_tests.sh)… 😉

---

_[View the full topic](https://community.sonarsource.com/t/plsql-code-coverage/141667)._
