Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7498530

Browse files
authored
Replaced hard coded 0 in total test coverage
with covered lines / total total lines. Rounding to 17 decimal places since that's what I found when looking at cobertura examples online. Used an rpad to generate the format mask to avoid having a long string of 9s. This was mentioned in #1107 but does not have an issue of its own.
1 parent 75037c8 commit 7498530

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

source/reporters/ut_coverage_cobertura_reporter.tpb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,9 @@ create or replace type body ut_coverage_cobertura_reporter is
9090
--write header
9191
ut_utils.append_to_list(
9292
l_result,
93-
'<coverage line-rate="0" branch-rate="0.0" lines-covered="'
93+
'<coverage line-rate="'
94+
||to_char(round(a_coverage_data.covered_lines/(a_coverage_data.covered_lines + a_coverage_data.uncovered_lines), 17), rpad('FM0.',21,'9'))
95+
||'" branch-rate="0.0" lines-covered="'
9496
||a_coverage_data.covered_lines||'" lines-valid="'
9597
||TO_CHAR(a_coverage_data.covered_lines + a_coverage_data.uncovered_lines)
9698
||'" branches-covered="0" branches-valid="0" complexity="0" version="1" timestamp="'||l_epoch||'">'

0 commit comments

Comments
 (0)