GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Exclude set of Procs From Code Coverage report · Issue #1302 · utPLSQL/utPLSQL

Exclude set of Procs From Code Coverage report #1302

New issue
Copy link
New issue
Copy link
Closed
Closed
Exclude set of Procs From Code Coverage report#1302
Copy link
Labels
question

Description

@ntubati
ntubati
opened on May 2, 2025
Issue body actions

Describe the bug
I have package that has 11 functions .
I am trying to get the sonar coverage report for this and when I run

When I run the below command I am getting the coverage report all on the lines one code. I only wrote test cases for 2 procs and sonar report is showing 2.5% coverage
utplsql run -c "apps/****@db" -p="apps.TEST_XXGCO_BRIDGE_SAAS_INTG_PKG" -f=ut_coverage_sonar_reporter -o="utplsql_coverage.xml" --coverage-schemes=APPS -include=APPS.XXGCO_BRIDGE_SAAS_INTG_PKG

I am trying to exclude the other procs except the two procs that i wrote test cases. I tried to exclude one proc with following command

utplsql run -c "apps/****@db" -p="apps.TEST_XXGCO_BRIDGE_SAAS_INTG_PKG" -f=ut_coverage_sonar_reporter -o="utplsql_coverage.xml" --coverage-schemes=APPS -include=APPS.XXGCO_BRIDGE_SAAS_INTG_PKG -exclude=APPS.XXGCO_BRIDGE_SAAS_INTG_PKG.PROCESS_SALES_ORDER_EXTRACT

But it is giving me blank coverage report like below

Provide version info

Running on utPLSQL v3.1.14.4197

utPLSQL-cli 3.1.9.local

utPLSQL-java-api 3.1.9.local

Java-Version: 1.8.0_431

ORACLE_HOME: null

NLS_LANG: null

Thanks for testing!


**Information about client software**
What client was used to run utPLSQL tests? Was it from TOAD, SQLDeveloper, SQLPlus, PLSQL Developer etc...

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Example code**
If applicable, add sample code to help explain your problem.
Please avoid putting your company private/protected code in an issue, as it might violate your company's privacy and security policies.

**Additional context**
Add any other context about the problem here.

Activity

  1. jgebal commented on May 2, 2025

    @jgebal
    jgebal
    on May 2, 2025
    Member
    More actions

    Hello @ntubati

    The code coverage is a metric that indicates the percentage of code that is executed during a test run.
    You can read more about this for example here.

    utPLSQL provides line coverage and a block coverage (branches per line of code).
    The coverage is calculated at the level of compiled unit of code (package/procedure/function./trigger).

    It is not possible to exclude/include individual functions of a single package from a coverage report.

    That would also be very much confusing as the percentage of coverage is presented for the whole compiled program unit (package) not for the fragments of that program unit.

    I am not sure what is the goal that you are trying to achieve.

    In my opinion, since the coverage report says that 2.5% of code is covered with tests, than it is clear that the remaining part is not tested.
    This is perfect as it allows you to see the progress of coverage increasing as you write tests to cover the rest of the functionality of the package.

  2. ntubati commented on May 2, 2025

    @ntubati
    ntubati
    on May 2, 2025
    Author
    More actions

    Thanks for the detailed reply. We have never done unit testing cover for PLSQL in our application and we have lot of legacy code. we are planning to start using this and doing a poc. One of the ask is to see how we can calculate the code coverage only for incremental code not for the legacy code. I guess in this case first we have to upload as is code coverage which will show 0 and then look for coverage for incremental code.

    Ba based on what you explained , if i have custom package procedure which calls the standard oracle procedure , I can't exclude it from coverage report , but i can exclude it from testing?

  3. jgebal commented on May 3, 2025

    @jgebal
    jgebal
    on May 3, 2025
    Member
    More actions

    You can exclude separate units of compiled code.
    So you can exclude packages, standalone procedures and standalone functions.

    I suspect that you do not change oracle supplied packages by adding your custom code into their program units.
    If you do I would be very concerned.

    So you should be able to exclude program units that you do not own and only measure coverage on program units that you own and are responsible for.

    I hope this answers your questions.

  4. jgebal
    added
    question
    on May 9, 2026
  5. utPLSQL
    locked and limited conversation to collaborators on May 9, 2026
  6. jgebal
    converted this issue into a discussion #1348 on May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    question

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.