PLSQL code coverage

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, but it can be very complex, or even impossible, depending on how your source files are organized.

Even the example from the utPLSQL project had an error and didn’t generate a valid report. The command arguments are overly complex. It could be much simpler… :wink: