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
PL/SQL source lines identified as not feasible are being reported in code coverage metrics #1244
Comments
Hi @markhawker76 |
Hi, Thanks for replying quickly. I looked into the information provided by the SYS.DBMS_CODE_COVERAGE package when reporting on a run. I can confirm that the information populated in DBMSPCC_BLOCKS appears to be correct when using the coverage compiler pragma. However I do see the issue, as there is no easy way of identifying executable code within that block (or series of blocks using 'NOT_FEASIBLE_[START|END]' arguments. Many thanks, |
It would need to be investigated and developed as an enhancement. What vestion of DB are you using? |
Hi, I am using Oracle 21c EE with the latest patch set. I searched and found an interesting article from Chris Saxon regarding code coverage using line numbers rather than “execution blocks”. He thought that code coverage by line numbers alone could give false positives — especially if you have the following code scenario: IF func_a() OR func_b() Here there are two execution blocks that may or may not be executed due to short-circuit evaluation. Chris seemed to suggest a line-based coverage could falsely report coverage of “func_b()”, whereas the output of Oracle’s code coverage tools would yield a more accurate outcome. I guess the hard part would be interpreting the data provided by the database into a format a developer can readily understand. If there were a way of representing both line numbers and execution blocks at the same time, perhaps the Oracle code coverage data (if accurate), would be the way to go. Sign me up for helping to test if the utPLSQL team believe it is worth pursuing. Kind regards, |
Hi @markhawker76 That way, if only part of the PL/SQL line was covered, it will be indicated in the report. This provides best possible coverage information we can give. |
Hi,
When I am using the HTML code coverage reporter, I am getting PL/SQL source lines included in the code coverage metrics even though they have been excluded with the compile pragma COVERAGE using arguments 'NOT_FEASIBLE', 'NOT_FEASIBLE_START' or 'NOT_FEASIBLE_END'.
Please could you confirm whether this is expected behaviour or not. If expected, is there another way to exclude these lines of course (apart from removing them completely :-) )
Kind regards,
Mark.
The text was updated successfully, but these errors were encountered: