Description
Hi!
Somehow I missed the release of utPLSQL-cli v3.1.7 (which contains the fix for #143) and I'm testing it now... But when I run the command utplsql run <db> -f=ut_coverage_sonar_reporter -o="coverage.xml" -source_path=src
the output is generated without any coverage data. It works correctly in v3.1.6.
This issue isn't specific to ut_coverage_sonar_reporter, it can be reproduced with all coverage reporters.
By the way I noticed you're using v3.1.6 to generate these reports in the utPLSQL project, I think you'll have the same issue with 3.1.7. ;-)
How to Reproduce
- Compile betwnstr.sql and test_betwnstr.pkg in the database
- Create a
src
directory with a file namedbetwnstr.fnc
- Run
utplsql run <connection> -p=test_betwnstr -f=ut_coverage_sonar_reporter -o="coverage.xml" -source_path=src
Expected behavior
The coverage.xml file generated by utplsql-cli should contain the coverage data, e.g.:
<?xml version="1.0" encoding="WINDOWS-1252"?>
<coverage version="1">
<file path="src\betwnstr.fnc">
<lineToCover lineNumber="2" covered="true"/>
<lineToCover lineNumber="4" covered="true"/>
<lineToCover lineNumber="5" covered="true"/>
<lineToCover lineNumber="7" covered="true"/>
</file>
</coverage>
Current behavior
The file is created without coverage data:
<?xml version="1.0" encoding="WINDOWS-1252"?>
<coverage version="1">
</coverage>
Version info
utplsql-cli info <db>
:
utPLSQL-cli 3.1.7-SNAPSHOT.local
utPLSQL-java-api 3.1.7.504
utPLSQL 3.1.8.3190
From utplsql-cli run (...)
:
###################### utPLSQL cli #######################
# #
# utPLSQL-cli 3.1.7-SNAPSHOT.local #
# utPLSQL-java-api 3.1.7.504 #
# Java-Version: 1.8.0_201 #
# ORACLE_HOME: null #
# NLS_LANG: BRAZILIAN PORTUGUESE_BRAZIL.WE8ISO8859P1 #
# #
# Thanks for testing! #
# #
##########################################################