★ wanayoo — archive 1999 https://github.com/utPLSQL/utPLSQL/issues/745Nouvelle recherche | Portail wanayoo
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

Enchance coverage with procedure level data #745

Open
jgebal opened this issue Jul 31, 2018 · 2 comments
Open

Enchance coverage with procedure level data #745

jgebal opened this issue Jul 31, 2018 · 2 comments
Labels

Comments

@jgebal
Copy link
Member

@jgebal jgebal commented Jul 31, 2018

If package was complied eith plscope enabled we can provide procedure level coverage with cobertura report.
Query to retrieve procrdure start/end lines:

with
   base as (
      select i.owner, 
             i.object_type, 
             i.object_name, 
             i.name as procedure_name, 
             i.line as start_line, 
             lead(i.line-1 respect nulls) over(order by i.line, i.col) as end_line,
             max(
                case 
                   when i.usage = 'DECLARATION' then 
                      1 
                   else 0 
                end
             ) over (partition by i.signature) as is_private             
        from dba_identifiers i
       where i.object_type = 'PACKAGE BODY'
         and i.type in ('FUNCITON', 'PROCEDURE')
         and i.usage in ('DECLARATION','DEFINITION')
   )
select owner, object_type, object_name, procedure_name, start_line, end_line
  from base
 where is_private = 0;
@jgebal jgebal added the enhancement label Aug 9, 2018
@lwasylow
Copy link
Member

@lwasylow lwasylow commented Oct 21, 2018

That would be a great improvment however quite a substantial changes would have to be done to html format so we can provide a quick links to procedure line and some package level summary ( drill into)
e.g.
PACKAGE1 - 60%
-> PROCEDURE1 100%
-> PROCEDURE2 10%

@jgebal
Copy link
Member Author

@jgebal jgebal commented Oct 21, 2018

There are 2 aspects to it.

  1. make it possible (coverage code changes)
  2. make it reportable (reporters code changes)

I would start with No. 1
We will need to make sure it is accurate.

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.