Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
287590b
12.2 Stable :
lwasylow Mar 11, 2018
68768f8
12.2 Stable :
lwasylow Mar 13, 2018
76bf869
12.2 Stable :
lwasylow Mar 13, 2018
1f4f5f0
Tests 12.2 Coverage:
lwasylow Mar 14, 2018
90858eb
Added 12.2 coverage
lwasylow Mar 14, 2018
d77cf9a
Test 12.2 coverage
lwasylow Mar 14, 2018
4f83357
Added 12.2 Coverage
lwasylow Mar 14, 2018
ac40332
Added 12.2 Coverage
lwasylow Mar 14, 2018
5f74db9
Merge pull request #602 from lwasylow/12coveragestab2
lwasylow Mar 14, 2018
9d7f16c
Added conditional install of tests for 12.2 only - when block coverag…
jgebal Mar 15, 2018
20541b5
Refactoring coverage:
lwasylow Mar 18, 2018
ab7eb93
Coverage Refactoring:
lwasylow Mar 23, 2018
8dbb1a1
Merge pull request #614 from lwasylow/feature/12cblockcoverage
lwasylow Mar 25, 2018
e0b220d
Merge branch 'develop' into feature/12cblockcoverage
lwasylow Mar 25, 2018
2560f5b
Revert "Feature/12cblockcoverage"
lwasylow Mar 25, 2018
6fe32c5
Merge pull request #615 from utPLSQL/revert-614-feature/12cblockcoverage
lwasylow Mar 25, 2018
8235848
Refactor Coverage:
lwasylow Mar 25, 2018
78fdab5
Refactor Coverage:
lwasylow Mar 25, 2018
3a19341
Merge branch 'feature/12cblockcoverage' of github.com:lwasylow/utPLSQ…
lwasylow Mar 25, 2018
466e126
Update test local
lwasylow Mar 25, 2018
e968f76
Merge pull request #616 from lwasylow/feature/12cblockcoverage
lwasylow Mar 25, 2018
0f1d789
12.2 coverage
lwasylow Apr 3, 2018
faab0fe
Merge pull request #625 from lwasylow/feature/12cblockcoverage
lwasylow Apr 3, 2018
35e5e13
12.2 coverage
lwasylow Apr 3, 2018
1289e99
Merge branch 'feature/12cblockcoverage' of github.com:lwasylow/utPLSQ…
lwasylow Apr 3, 2018
d3ce10c
Merge pull request #626 from lwasylow/feature/12cblockcoverage
lwasylow Apr 3, 2018
c0ca9d3
Fixing error in package name
lwasylow Apr 3, 2018
f151a6e
Update test
lwasylow Apr 4, 2018
28f7653
Statement Coverage First Commit
lwasylow Apr 7, 2018
1f51049
Merge branch 'develop' of https://github.com/utPLSQL/utPLSQL into fea…
lwasylow Apr 7, 2018
9c87b06
Merge branch 'develop' of github.com:utPLSQL/utPLSQL into feature/12c…
lwasylow Apr 7, 2018
d8b8e87
Updated coverage with statement level information
lwasylow Apr 7, 2018
49b1b84
Move get_cov_sql function into common package to remove code duplication
lwasylow Apr 8, 2018
ab7eb24
Refactor Coverage to now enrich profile for partially covered lines u…
lwasylow Apr 8, 2018
36279fa
Update tests and fixed typo in original coverage reporter
lwasylow Apr 10, 2018
661ef74
Merge branch 'feature/12cblockcoverage' of https://github.com/utPLSQL…
lwasylow Apr 10, 2018
57f7a4f
Updated coverage
lwasylow Apr 11, 2018
3a2ff00
Merge branch 'develop' of https://github.com/utPLSQL/utPLSQL into fea…
lwasylow Apr 11, 2018
e6c2be2
Merge pull request #640 from lwasylow/feature/12cov_extended
lwasylow Apr 11, 2018
c9cb004
Fixes to conditional compilation
lwasylow Apr 11, 2018
a862b95
Fixes to new asso array during mock coverage id.
lwasylow Apr 11, 2018
57ee184
Merge pull request #641 from lwasylow/feature/12cblockcoverage
lwasylow Apr 11, 2018
4561795
Update test
lwasylow Apr 11, 2018
0556fbe
Update test
lwasylow Apr 11, 2018
b91e51d
Merge branch 'feature/12cblockcoverage' of github.com:utPLSQL/utPLSQL…
lwasylow Apr 11, 2018
d19f941
Update test/core/reporters/test_extended_coverage.pkb
lwasylow Apr 11, 2018
e2e1437
Updated html reporter to show a information about the partially cover…
lwasylow Apr 11, 2018
a112e36
Added support for block coverage in sonar and cobertura reporters.
jgebal Apr 14, 2018
f0e2653
Clean-up and removal of unnecessary reporters
lwasylow Apr 15, 2018
4458dff
Unify reporters
lwasylow Apr 15, 2018
2027421
Update test
lwasylow Apr 15, 2018
924eb9b
Update issue with part covered being zero.
lwasylow Apr 15, 2018
a111c6d
Update for test with timestamp
lwasylow Apr 15, 2018
2d6c7d3
Merge branch 'develop' into feature/12cblockcoverage
lwasylow Apr 16, 2018
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
106 changes: 53 additions & 53 deletions source/api/ut.pkb

Large diffs are not rendered by default.

48 changes: 24 additions & 24 deletions source/api/ut.pks
Original file line number Diff line number Diff line change
Expand Up @@ -49,74 +49,74 @@ create or replace package ut authid current_user as

function run(
a_reporter ut_reporter_base := null, a_color_console integer := 0,
a_coverage_schemes ut_varchar2_list := null,a_coverage_type varchar2:=null, a_source_file_mappings ut_file_mappings := null, a_test_file_mappings ut_file_mappings := null,
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null
a_coverage_schemes ut_varchar2_list := null, a_source_file_mappings ut_file_mappings := null, a_test_file_mappings ut_file_mappings := null,
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null, a_coverage_type varchar2:=null
) return ut_varchar2_rows pipelined;

function run(
a_reporter ut_reporter_base := null, a_color_console integer := 0,
a_coverage_schemes ut_varchar2_list := null,a_coverage_type varchar2:=null, a_source_files ut_varchar2_list, a_test_files ut_varchar2_list,
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null
a_coverage_schemes ut_varchar2_list := null, a_source_files ut_varchar2_list, a_test_files ut_varchar2_list,
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null, a_coverage_type varchar2:=null
) return ut_varchar2_rows pipelined;

function run(
a_paths ut_varchar2_list, a_reporter ut_reporter_base := null, a_color_console integer := 0,
a_coverage_schemes ut_varchar2_list := null,a_coverage_type varchar2:=null, a_source_file_mappings ut_file_mappings := null, a_test_file_mappings ut_file_mappings := null,
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null
a_coverage_schemes ut_varchar2_list := null, a_source_file_mappings ut_file_mappings := null, a_test_file_mappings ut_file_mappings := null,
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null, a_coverage_type varchar2:=null
) return ut_varchar2_rows pipelined;

function run(
a_paths ut_varchar2_list, a_reporter ut_reporter_base := null, a_color_console integer := 0,
a_coverage_schemes ut_varchar2_list := null,a_coverage_type varchar2:=null, a_source_files ut_varchar2_list, a_test_files ut_varchar2_list,
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null
a_coverage_schemes ut_varchar2_list := null, a_source_files ut_varchar2_list, a_test_files ut_varchar2_list,
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null, a_coverage_type varchar2:=null
) return ut_varchar2_rows pipelined;

function run(
a_path varchar2, a_reporter ut_reporter_base := null, a_color_console integer := 0,
a_coverage_schemes ut_varchar2_list := null,a_coverage_type varchar2:=null, a_source_file_mappings ut_file_mappings := null, a_test_file_mappings ut_file_mappings := null,
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null
a_coverage_schemes ut_varchar2_list := null, a_source_file_mappings ut_file_mappings := null, a_test_file_mappings ut_file_mappings := null,
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null, a_coverage_type varchar2:=null
) return ut_varchar2_rows pipelined;

function run(
a_path varchar2, a_reporter ut_reporter_base := null, a_color_console integer := 0,
a_coverage_schemes ut_varchar2_list := null,a_coverage_type varchar2:=null, a_source_files ut_varchar2_list, a_test_files ut_varchar2_list,
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null
a_coverage_schemes ut_varchar2_list := null, a_source_files ut_varchar2_list, a_test_files ut_varchar2_list,
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null, a_coverage_type varchar2:=null
) return ut_varchar2_rows pipelined;

procedure run(
a_reporter ut_reporter_base := null, a_color_console boolean := false,
a_coverage_schemes ut_varchar2_list := null,a_coverage_type varchar2:=null, a_source_file_mappings ut_file_mappings := null, a_test_file_mappings ut_file_mappings := null,
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null
a_coverage_schemes ut_varchar2_list := null, a_source_file_mappings ut_file_mappings := null, a_test_file_mappings ut_file_mappings := null,
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null, a_coverage_type varchar2:=null
);

procedure run(
a_reporter ut_reporter_base := null, a_color_console boolean := false,
a_coverage_schemes ut_varchar2_list := null,a_coverage_type varchar2:=null, a_source_files ut_varchar2_list, a_test_files ut_varchar2_list,
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null
a_coverage_schemes ut_varchar2_list := null, a_source_files ut_varchar2_list, a_test_files ut_varchar2_list,
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null, a_coverage_type varchar2:=null
);

procedure run(
a_paths ut_varchar2_list, a_reporter ut_reporter_base := null, a_color_console boolean := false,
a_coverage_schemes ut_varchar2_list := null,a_coverage_type varchar2:=null, a_source_file_mappings ut_file_mappings := null, a_test_file_mappings ut_file_mappings := null,
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null
a_coverage_schemes ut_varchar2_list := null, a_source_file_mappings ut_file_mappings := null, a_test_file_mappings ut_file_mappings := null,
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null, a_coverage_type varchar2:=null
);

procedure run(
a_paths ut_varchar2_list, a_reporter ut_reporter_base := null, a_color_console boolean := false,
a_coverage_schemes ut_varchar2_list := null,a_coverage_type varchar2:=null, a_source_files ut_varchar2_list, a_test_files ut_varchar2_list,
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null
a_coverage_schemes ut_varchar2_list := null, a_source_files ut_varchar2_list, a_test_files ut_varchar2_list,
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null, a_coverage_type varchar2:=null
);

procedure run(
a_path varchar2, a_reporter ut_reporter_base := null, a_color_console boolean := false,
a_coverage_schemes ut_varchar2_list := null,a_coverage_type varchar2:=null, a_source_file_mappings ut_file_mappings := null, a_test_file_mappings ut_file_mappings := null,
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null
a_coverage_schemes ut_varchar2_list := null, a_source_file_mappings ut_file_mappings := null, a_test_file_mappings ut_file_mappings := null,
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null, a_coverage_type varchar2:=null
);

procedure run(
a_path varchar2, a_reporter ut_reporter_base := null, a_color_console boolean := false,
a_coverage_schemes ut_varchar2_list := null,a_coverage_type varchar2:=null, a_source_files ut_varchar2_list, a_test_files ut_varchar2_list,
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null
a_coverage_schemes ut_varchar2_list := null, a_source_files ut_varchar2_list, a_test_files ut_varchar2_list,
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null, a_coverage_type varchar2:=null
);

/**
Expand Down
4 changes: 2 additions & 2 deletions source/api/ut_runner.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ create or replace package body ut_runner is

procedure run(
a_paths ut_varchar2_list, a_reporters ut_reporters, a_color_console boolean := false,
a_coverage_schemes ut_varchar2_list := null,a_coverage_type varchar2 := null, a_source_file_mappings ut_file_mappings := null, a_test_file_mappings ut_file_mappings := null,
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null, a_fail_on_errors boolean default false
a_coverage_schemes ut_varchar2_list := null, a_source_file_mappings ut_file_mappings := null, a_test_file_mappings ut_file_mappings := null,
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null, a_fail_on_errors boolean default false,a_coverage_type varchar2 := null
) is
l_items_to_run ut_run;
l_listener ut_event_listener;
Expand Down
5 changes: 3 additions & 2 deletions source/api/ut_runner.pks
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ create or replace package ut_runner authid current_user is
*/
procedure run(
a_paths ut_varchar2_list, a_reporters ut_reporters, a_color_console boolean := false,
a_coverage_schemes ut_varchar2_list := null,a_coverage_type varchar2 := null , a_source_file_mappings ut_file_mappings := null, a_test_file_mappings ut_file_mappings := null,
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null, a_fail_on_errors boolean default false
a_coverage_schemes ut_varchar2_list := null, a_source_file_mappings ut_file_mappings := null, a_test_file_mappings ut_file_mappings := null,
a_include_objects ut_varchar2_list := null, a_exclude_objects ut_varchar2_list := null,
a_fail_on_errors boolean default false, a_coverage_type varchar2 := null
);

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
create or replace package body ut_block_helper is
create or replace package body ut_block_coverage_helper is
/*
utPLSQL - Version 3
Copyright 2016 - 2017 utPLSQL Project
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
create or replace package ut_block_helper authid definer is
create or replace package ut_block_coverage_helper authid definer is
/*
utPLSQL - Version 3
Copyright 2016 - 2017 utPLSQL Project
Expand Down
2 changes: 1 addition & 1 deletion source/core/coverage/ut_coverage_block.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ create or replace package body ut_coverage_block is
exit when l_source_objects_crsr%notfound;

--get coverage data
l_line_calls := ut_block_helper.get_raw_coverage_data_block(l_source_object.owner, l_source_object.name);
l_line_calls := ut_block_coverage_helper.get_raw_coverage_data_block(l_source_object.owner, l_source_object.name);

--if there is coverage, we need to filter out the garbage (badly indicated data)
if l_line_calls.count > 0 then
Expand Down
8 changes: 4 additions & 4 deletions source/core/coverage/ut_coverage_helper.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ create or replace package body ut_coverage_helper is
set_coverage_type(a_coverage_type);
if get_coverage_type = ut_coverage.c_block_coverage then
$if dbms_db_version.version = 12 and dbms_db_version.release >= 2 or dbms_db_version.version > 12 $then
ut_block_helper.coverage_start(a_run_comment => a_run_comment ,a_coverage_id => g_coverage_id );
ut_block_coverage_helper.coverage_start(a_run_comment => a_run_comment ,a_coverage_id => g_coverage_id );
$else
null;
raise_application_error(ut_utils.gc_invalid_coverage_type,'Invalid coverage type requested. Please validate your Oracle install');
$end
else
ut_proftab_helper.coverage_start(a_run_comment => a_run_comment, a_coverage_id => g_coverage_id);
Expand Down Expand Up @@ -123,7 +123,7 @@ create or replace package body ut_coverage_helper is
g_is_started := false;
if get_coverage_type = ut_coverage.c_block_coverage then
$if dbms_db_version.version = 12 and dbms_db_version.release >= 2 or dbms_db_version.version > 12 $then
ut_block_helper.coverage_stop();
ut_block_coverage_helper.coverage_stop();
$else
null;
$end
Expand All @@ -139,7 +139,7 @@ create or replace package body ut_coverage_helper is
g_is_started := false;
if get_coverage_type = ut_coverage.c_block_coverage then
$if dbms_db_version.version = 12 and dbms_db_version.release >= 2 or dbms_db_version.version > 12 $then
ut_block_helper.coverage_stop();
ut_block_coverage_helper.coverage_stop();
$else
null;
$end
Expand Down
5 changes: 5 additions & 0 deletions source/core/ut_utils.pks
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ create or replace package ut_utils authid definer is
gc_invalid_version_no constant pls_integer := -20214;
pragma exception_init(ex_invalid_version_no, -20214);

-- Invalid coverage type
ex_invalid_coverage_type exception;
gc_invalid_coverage_type constant pls_integer := -20215;
pragma exception_init(ex_invalid_coverage_type, -20215);

gc_max_storage_varchar2_len constant integer := 4000;
gc_max_output_string_length constant integer := 4000;
gc_max_input_string_length constant integer := gc_max_output_string_length - 2; --we need to remove 2 chars for quotes around string
Expand Down
4 changes: 2 additions & 2 deletions source/install.sql
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,14 @@ prompt Installing DBMSPLSQL Tables objects into &&ut3_owner schema
--gathering coverage
@@install_component.sql 'core/coverage/ut_coverage_sources_tmp.sql'
@@install_component.sql 'core/coverage/ut_coverage_helper.pks'
@@install_above_12_1.sql 'core/coverage/ut_block_helper.pks'
@@install_above_12_1.sql 'core/coverage/ut_block_coverage_helper.pks'
@@install_component.sql 'core/coverage/ut_proftab_helper.pks'
@@install_component.sql 'core/coverage/ut_coverage.pks'
@@install_above_12_1.sql 'core/coverage/ut_coverage_block.pks'
@@install_component.sql 'core/coverage/ut_coverage_proftab.pks'
@@install_component.sql 'core/coverage/ut_coverage_reporter_base.tps'
@@install_component.sql 'core/coverage/ut_coverage_helper.pkb'
@@install_above_12_1.sql 'core/coverage/ut_block_helper.pkb'
@@install_above_12_1.sql 'core/coverage/ut_block_coverage_helper.pkb'
@@install_component.sql 'core/coverage/ut_proftab_helper.pkb'
@@install_component.sql 'core/coverage/ut_coverage.pkb'
@@install_above_12_1.sql 'core/coverage/ut_coverage_block.pkb'
Expand Down
28 changes: 28 additions & 0 deletions test/install_below_12_2.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
set termout off
set echo off
spool dummy.sql
prompt whenever sqlerror exit failure rollback
spool off


def FILE_NAME = '&&1'
column SCRIPT_NAME new_value SCRIPT_NAME noprint

VAR V_FILE_NAME VARCHAR2(1000);
begin
if dbms_db_version.version = 12 and dbms_db_version.release < 2
or dbms_db_version.version < 12
then
:V_FILE_NAME := '&&FILE_NAME';
else
:V_FILE_NAME := 'dummy.sql';
end if;
end;
/
set verify off
select :V_FILE_NAME as SCRIPT_NAME from dual;
set termout on


@@&&SCRIPT_NAME

4 changes: 4 additions & 0 deletions test/install_tests.sql
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ whenever oserror exit failure rollback
@@core/test_suite_manager.pks
@@core/reporters/test_coverage.pks
set define on
@@install_below_12_2.sql 'core/reporters/test_not_existing_block.pks'
@@install_below_12_2.sql 'core/reporters/test_not_existing_block.pkb'
set define off
set define on
@@install_above_12_1.sql 'core/reporters/test_block_coverage.pks'
@@install_above_12_1.sql 'core/reporters/test_coverage/test_html_block_reporter.pks'
@@install_above_12_1.sql 'core/reporters/test_coverage/test_coveralls_reporter_block.pks'
Expand Down