Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The 1st character of the files paths is removed from the reports #220

Open
BrandonMercerSC opened this issue Oct 2, 2023 · 0 comments
Open

Comments

@BrandonMercerSC
Copy link

BrandonMercerSC commented Oct 2, 2023

I'm using the cli to execute my tests and generate my reports, example:

utplsql run ${ORACLE_USER}/${ORACLE_PASSWORD}@${ORACLE_HOST}:${ORACLE_PORT}/${ORACLE_SERVICE} \
-source_path=src \
-test_path=tests \
-f=ut_documentation_reporter        -c \
-f=ut_coverage_html_reporter        -o=results/coverage.html \
-f=ut_coverage_cobertura_reporter   -o=results/cobertura.xml \
-f=ut_coverage_sonar_reporter       -o=results/coverage.xml \
-f=ut_sonar_test_reporter           -o=results/test_results.xml \
-f=ut_junit_reporter                -o=results/junit_test_results.xml \
--failure-exit-code=0

However the reports are being generated with file paths missing the 1st character no matter how I terminate the cli properties or reorganize my folder structure. I'm tried enclosing with both single and double qoutes.

This happens with all the cobertura report, sonar coverage and sonar test reports that I've tried.

<?xml version="1.0" encoding="US-ASCII"?>
<coverage version="1">
<file path="rc/award_bonus/award_bonus.prc">
<lineToCover lineNumber="6" covered="true"/>
<lineToCover lineNumber="10" covered="true"/>
<lineToCover lineNumber="11" covered="true"/>
<lineToCover lineNumber="13" covered="true"/>
</file>
<file path="rc/between_string/betwnstr.fnc">
<lineToCover lineNumber="2" covered="true"/>
<lineToCover lineNumber="4" covered="true"/>
<lineToCover lineNumber="5" covered="true"/>
<lineToCover lineNumber="7" covered="true"/>
</file>
<file path="rc/remove_rooms_by_name/remove_rooms_by_name.prc">
<lineToCover lineNumber="3" covered="true"/>
<lineToCover lineNumber="4" covered="true"/>
<lineToCover lineNumber="6" covered="true"/>
</file>
</coverage>

The only work around so far is to add absolute pathing, e.g. './src'. This generates the following

<?xml version="1.0" encoding="US-ASCII"?>
<coverage version="1">
<file path="/src/award_bonus/award_bonus.prc">
<lineToCover lineNumber="6" covered="true"/>
<lineToCover lineNumber="10" covered="true"/>
<lineToCover lineNumber="11" covered="true"/>
<lineToCover lineNumber="13" covered="true"/>
</file>
<file path="/src/between_string/betwnstr.fnc">
<lineToCover lineNumber="2" covered="true"/>
<lineToCover lineNumber="4" covered="true"/>
<lineToCover lineNumber="5" covered="true"/>
<lineToCover lineNumber="7" covered="true"/>
</file>
<file path="/src/remove_rooms_by_name/remove_rooms_by_name.prc">
<lineToCover lineNumber="3" covered="true"/>
<lineToCover lineNumber="4" covered="true"/>
<lineToCover lineNumber="6" covered="true"/>
</file>
</coverage>

But this doesnt work for sonarqube server instance as the / infront of the filepath is not recognized and sonarqube cannot see the files listed and no coverage report is generated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant