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

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
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.
  • Loading branch information
OsBlaineOra authored Jun 1, 2021
commit 74985306f9f52b85bdc9ae69729ec402f02a3754
4 changes: 3 additions & 1 deletion source/reporters/ut_coverage_cobertura_reporter.tpb
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ create or replace type body ut_coverage_cobertura_reporter is
--write header
ut_utils.append_to_list(
l_result,
'<coverage line-rate="0" branch-rate="0.0" lines-covered="'
'<coverage line-rate="'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice small fix. Love it!

||to_char(round(a_coverage_data.covered_lines/(a_coverage_data.covered_lines + a_coverage_data.uncovered_lines), 17), rpad('FM0.',21,'9'))
||'" branch-rate="0.0" lines-covered="'
||a_coverage_data.covered_lines||'" lines-valid="'
||TO_CHAR(a_coverage_data.covered_lines + a_coverage_data.uncovered_lines)
||'" branches-covered="0" branches-valid="0" complexity="0" version="1" timestamp="'||l_epoch||'">'
Expand Down