I then use following query to get the %coverage of the code:
SELECT COUNT(*) profiled_lines
FROM plsql_profiler_units u, plsql_profiler_data d
WHERE u.runid = d.runid
AND u.unit_number = d.unit_number
AND u.runid = 1 --say 1 is the runid
AND u.unit_owner = user
AND u.unit_name = 'PK_TESTPROF'
AND u.unit_type = 'PACKAGE BODY'
It gives me a % coverage of 66.67
Is the query of calculating the %ge code coverage is correct? I wonder.
Could anybody please suggest something on this?
Also is there a way of achieving 100% code coverage using this? If yes how?