Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
0434e17
`ut_output_buffer` is now fully abstracted from caller and caller can…
jgebal Jul 14, 2017
79b3702
Merge branch 'develop' into feature/reporters_object_model_fix
pesse Feb 12, 2018
a9031f4
Fixed some merge issues
pesse Feb 12, 2018
19ac972
We should keep installing ut_message_id_seq I guess...
pesse Feb 13, 2018
43b8754
Fixed output buffer and related test.
jgebal Feb 14, 2018
7fde523
Version number to 3 instead of X.X.X.X
pesse Feb 14, 2018
b8dc2a6
Output-Buffer no longer deletes contents during init
pesse Feb 21, 2018
8fefdcf
Added ut_output_reporter_base to synonyms and grants
pesse Feb 22, 2018
83e4b0b
Revert "Added ut_output_reporter_base to synonyms and grants"
pesse Feb 27, 2018
b4ece73
Added new member-function has_output to easily check
pesse Feb 27, 2018
94b7ea1
Merge remote-tracking branch 'upstream/develop' into feature/reporter…
pesse Feb 27, 2018
d792fec
Revert "Added new member-function has_output to easily check"
pesse Feb 28, 2018
202e697
Reapply "Added ut_output_reporter_base to synonyms and grants""
pesse Feb 28, 2018
bfde057
Add function to check whether a given name is a valid output reporter
pesse Feb 28, 2018
92f7b4c
Replace is_output_reporter by get_reporters_list
pesse Mar 4, 2018
5272342
Added description to all reporters
pesse Mar 5, 2018
7b34109
Unit-Test for get_reporters_list
pesse Mar 5, 2018
aae83f2
Fix get_reporters_list unit-test
pesse Mar 5, 2018
014981c
Merge remote-tracking branch 'upstream/develop' into feature/reporter…
pesse Mar 5, 2018
4488415
We have a Cobertura-Reporter now, too
pesse Mar 5, 2018
762727b
Improved reporter-description according to jgebal's suggestions
pesse Mar 6, 2018
7e428a1
Bump version to 3.1.0
pesse Mar 6, 2018
a466609
Merge remote-tracking branch 'upstream/develop' into feature/reporter…
pesse Mar 7, 2018
c0df23d
Added Cobertura Description
lwasylow Mar 7, 2018
cdacf29
Added Cobertura Description
lwasylow Mar 7, 2018
9504d1b
Merge remote-tracking branch 'upstream/develop' into feature/reporter…
pesse Mar 7, 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
Prev Previous commit
Next Next commit
Replace is_output_reporter by get_reporters_list
The list should return all known Reporters and information about
whether the reporter is an output reporter or not
  • Loading branch information
pesse committed Mar 4, 2018
commit 92f7b4c63d520834d48b0af06c67b3afed9df989
46 changes: 31 additions & 15 deletions source/api/ut_runner.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -141,22 +141,38 @@ create or replace package body ut_runner is
return;
end;

function is_output_reporter( a_reporter_name varchar2 ) return varchar is
l_result varchar2(1);
l_reporter_name varchar2(32) := regexp_replace(a_reporter_name, '[^a-zA-Z0-9_]', '');
function get_reporters_list return tt_reporters_info pipelined
AS
l_cursor sys_refcursor;
l_owner varchar2(128) := ut_utils.ut_owner();
begin
execute immediate '
select
case
when '||l_reporter_name||'() is of ('||l_owner||'.ut_output_reporter_base) then ''Y''
when '||l_reporter_name||'() is of ('||l_owner||'.ut_reporter_base) then ''N''
end
from dual' into l_result;
return l_result;
exception when others then
return null;
end;
l_results tt_reporters_info;
c_bulk_limit constant integer := 10;
begin
open l_cursor for 'SELECT
owner || ''.'' || type_name,
CASE
WHEN sys_connect_by_path(owner
|| ''.''
|| type_name,'','') LIKE ''%' || l_owner || '''
|| ''.UT_OUTPUT_REPORTER_BASE%'' THEN ''Y''
ELSE ''N''
END
is_output_reporter
FROM dba_types t
WHERE instantiable = ''YES''
CONNECT BY supertype_name = PRIOR type_name AND supertype_owner = PRIOR owner
START WITH type_name = ''UT_REPORTER_BASE'' AND owner = '''|| l_owner || '''';
loop
fetch l_cursor bulk collect into l_results limit c_bulk_limit;
for i in 1 .. l_results.count loop
pipe row (l_results(i));
end loop;
exit when l_cursor%notfound;
end loop;
close l_cursor;
end;



end ut_runner;
/
17 changes: 9 additions & 8 deletions source/api/ut_runner.pks
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,17 @@ create or replace package ut_runner authid current_user is
*/
function get_unit_test_info(a_owner varchar2, a_package_name varchar2 := null) return tt_annotations pipelined;

/** Checks whether a reporter is an output reporter or not
* If reporter is of ut_output_reporter_base, returns 'Y'
* If reporter is of ut_reporter_base, returns 'N'
* Otherwise returns NULL
type t_reporter_rec is record (
reporter_object_name varchar2(250),
is_output_reporter varchar2(1) --Y/N flag
);
type tt_reporters_info is table of t_reporter_rec ;

/** Returns a list of available reporters. Gives information about whether a reporter is an output reporter or not
*
* @param a_reporter_name Name of the reporter to check
* @return Y, N or NULL
* @return tt_reporters_info
*/
function is_output_reporter( a_reporter_name varchar2 ) return varchar;

function get_reporters_list return tt_reporters_info pipelined;

end ut_runner;
/