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
38 commits
Select commit Hold shift + click to select a range
b1f6323
Initial, incomplete version of reporter
PhilippSalvisberg Dec 17, 2018
e83eeaf
added grants ans synonyms for ut_sqldev_reporter
PhilippSalvisberg Dec 17, 2018
99c1d31
rename ut_sqldev_reporter to ut_realtime_reporter
PhilippSalvisberg Dec 27, 2018
6531e08
add initial test suite for ut_realtime_reporter
PhilippSalvisberg Dec 28, 2018
28a1a73
install test_realtime_reporter
PhilippSalvisberg Dec 28, 2018
010b8fd
add ut_realtime_reporter to list of core reporters
PhilippSalvisberg Dec 28, 2018
9e79e6f
use print_xml_fragment for pretty printing
PhilippSalvisberg Dec 28, 2018
4b29c56
changed formatting and comments
PhilippSalvisberg Dec 28, 2018
2f22a89
new XML report format, using XML attributes for id only
PhilippSalvisberg Dec 28, 2018
d45c88c
extended unit test, reasonable coverage, helps understanding the repo…
PhilippSalvisberg Dec 28, 2018
b37b188
enable drop of test packages
PhilippSalvisberg Dec 28, 2018
8c1c561
remove hard-coded owner ut3_tester
PhilippSalvisberg Dec 28, 2018
bcf1606
make complete event a.s.a.p. visible in consuming session
PhilippSalvisberg Dec 28, 2018
d4b09c7
fix incompatibility to 12.1
PhilippSalvisberg Dec 29, 2018
c2cc292
Fixed typos in comments and made comments more precise.
PhilippSalvisberg Dec 29, 2018
0c6a0ad
get_description synchronized with type specification.
PhilippSalvisberg Dec 29, 2018
7134f13
use print_end_node to close tags
PhilippSalvisberg Dec 29, 2018
2577566
removed duplicate line feed
PhilippSalvisberg Dec 29, 2018
1672248
removed duplicate line feed
PhilippSalvisberg Dec 29, 2018
42cf8ee
change description of the tests to reflect the requirements as sugges…
PhilippSalvisberg Dec 29, 2018
6512cf8
replace granular self.print_text_lines calls with a few self.print_te…
PhilippSalvisberg Dec 29, 2018
c1273af
added text_xmltype_list collection type for test_realtime_reporter
PhilippSalvisberg Dec 29, 2018
b05760d
install new collection type test_xmltype_list for test_realtime_reporter
PhilippSalvisberg Dec 29, 2018
93e4ea8
add xml_header attribute, used for each produced document
PhilippSalvisberg Dec 29, 2018
290ca30
replace hard-coded id attribute with name and value for an optional a…
PhilippSalvisberg Dec 29, 2018
e570e48
produce an XML document for each event resulting in a new output stru…
PhilippSalvisberg Dec 29, 2018
17ed198
changed name and description to match new output structure
PhilippSalvisberg Dec 29, 2018
eef5938
test 26 event-based XML documents produced by the revised reporter
PhilippSalvisberg Dec 29, 2018
eba2e9e
change comment to reflect new role of the member procedure
PhilippSalvisberg Dec 30, 2018
8f5b736
Added `item_type` attribute to output buffer.
jgebal Dec 30, 2018
e02d238
Added `item_type` attribute to output reporters.
jgebal Dec 30, 2018
fc0f0e9
Fixed failing examples.
jgebal Dec 30, 2018
fb96511
create object type and collection type for test_realtime_reporter
PhilippSalvisberg Dec 31, 2018
957e5c9
produce 1 row per event document using new output buffer
PhilippSalvisberg Dec 31, 2018
f992193
renamed package persistent variable
PhilippSalvisberg Dec 31, 2018
576b8ea
Fix crash due to null value.
PhilippSalvisberg Dec 31, 2018
73669eb
Fixed issues with nested runs
PhilippSalvisberg Jan 1, 2019
cc3a7e4
Extracted duplicated code from pipelined functions into `get_report_o…
jgebal Jan 1, 2019
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
Added item_type attribute to output reporters.
Added missing items in uninstall.
  • Loading branch information
jgebal committed Dec 30, 2018
commit e02d238c2c2f271b63d785bd8f2d77ea8639dd1f
22 changes: 9 additions & 13 deletions source/core/types/ut_output_reporter_base.tpb
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,19 @@ create or replace type body ut_output_reporter_base is
l_output_table_buffer := treat(self.output_buffer as ut_output_table_buffer);
end;

member procedure print_text(self in out nocopy ut_output_reporter_base, a_text varchar2) is
member procedure print_text(self in out nocopy ut_output_reporter_base, a_text varchar2, a_item_type varchar2 := null) is
begin
self.output_buffer.send_line(a_text);
self.output_buffer.send_line(a_text, a_item_type);
end;

member procedure print_text_lines(self in out nocopy ut_output_reporter_base, a_text_lines ut_varchar2_rows) is
member procedure print_text_lines(self in out nocopy ut_output_reporter_base, a_text_lines ut_varchar2_rows, a_item_type varchar2 := null) is
begin
self.output_buffer.send_lines(a_text_lines);
self.output_buffer.send_lines(a_text_lines, a_item_type);
end;

member procedure print_clob(self in out nocopy ut_output_reporter_base, a_clob clob, a_item_type varchar2 := null) is
begin
self.output_buffer.send_clob( a_clob, a_item_type );
end;

final member function get_lines(a_initial_timeout natural := null, a_timeout_sec natural) return ut_output_data_rows pipelined is
Expand All @@ -68,15 +73,6 @@ create or replace type body ut_output_reporter_base is
self.output_buffer.lines_to_dbms_output(a_initial_timeout, a_timeout_sec);
end;

member procedure print_clob(self in out nocopy ut_output_reporter_base, a_clob clob) is
begin
if a_clob is not null and dbms_lob.getlength(a_clob) > 0 then
self.print_text_lines(
ut_utils.convert_collection( ut_utils.clob_to_table( a_clob, ut_utils.gc_max_storage_varchar2_len ) )
);
end if;
end;

overriding final member procedure on_finalize(self in out nocopy ut_output_reporter_base, a_run in ut_run) is
begin
self.output_buffer.close();
Expand Down
6 changes: 3 additions & 3 deletions source/core/types/ut_output_reporter_base.tps
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ create or replace type ut_output_reporter_base under ut_reporter_base(
overriding member procedure set_reporter_id(self in out nocopy ut_output_reporter_base, a_reporter_id raw),
overriding member procedure before_calling_run(self in out nocopy ut_output_reporter_base, a_run in ut_run),

member procedure print_text(self in out nocopy ut_output_reporter_base, a_text varchar2),
member procedure print_text_lines(self in out nocopy ut_output_reporter_base, a_text_lines ut_varchar2_rows),
member procedure print_clob(self in out nocopy ut_output_reporter_base, a_clob clob),
member procedure print_text(self in out nocopy ut_output_reporter_base, a_text varchar2, a_item_type varchar2 := null),
member procedure print_text_lines(self in out nocopy ut_output_reporter_base, a_text_lines ut_varchar2_rows, a_item_type varchar2 := null),
member procedure print_clob(self in out nocopy ut_output_reporter_base, a_clob clob, a_item_type varchar2 := null),

final member function get_lines(a_initial_timeout natural := null, a_timeout_sec natural := null) return ut_output_data_rows pipelined,
final member function get_lines_cursor(a_initial_timeout natural := null, a_timeout_sec natural := null) return sys_refcursor,
Expand Down
8 changes: 4 additions & 4 deletions source/reporters/ut_documentation_reporter.tpb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ create or replace type body ut_documentation_reporter is
return rpad(' ', self.lvl * 2);
end tab;

overriding member procedure print_clob(self in out nocopy ut_documentation_reporter, a_clob clob) is
overriding member procedure print_clob(self in out nocopy ut_documentation_reporter, a_clob clob, a_item_type varchar2 := null) is
l_lines ut_varchar2_list;
l_out_lines ut_varchar2_rows := ut_varchar2_rows();
begin
Expand All @@ -40,17 +40,17 @@ create or replace type body ut_documentation_reporter is
ut_utils.append_to_list(l_out_lines, tab() || l_lines(i) );
end if;
end loop;
(self as ut_output_reporter_base).print_text_lines(l_out_lines);
(self as ut_output_reporter_base).print_text_lines(l_out_lines, a_item_type);
end if;
end;

overriding member procedure print_text(self in out nocopy ut_documentation_reporter, a_text varchar2) is
overriding member procedure print_text(self in out nocopy ut_documentation_reporter, a_text varchar2, a_item_type varchar2 := null) is
l_lines ut_varchar2_list;
begin
if a_text is not null then
l_lines := ut_utils.string_to_table(a_text);
for i in 1 .. l_lines.count loop
(self as ut_output_reporter_base).print_text(tab || l_lines(i));
(self as ut_output_reporter_base).print_text(tab || l_lines(i), a_item_type);
end loop;
end if;
end;
Expand Down
4 changes: 2 additions & 2 deletions source/reporters/ut_documentation_reporter.tps
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ create or replace type ut_documentation_reporter under ut_console_reporter_base(
constructor function ut_documentation_reporter(self in out nocopy ut_documentation_reporter) return self as result,
member function tab(self in ut_documentation_reporter) return varchar2,

overriding member procedure print_clob(self in out nocopy ut_documentation_reporter, a_clob clob),
overriding member procedure print_text(self in out nocopy ut_documentation_reporter, a_text varchar2),
overriding member procedure print_clob(self in out nocopy ut_documentation_reporter, a_clob clob, a_item_type varchar2 := null),
overriding member procedure print_text(self in out nocopy ut_documentation_reporter, a_text varchar2, a_item_type varchar2 := null),
overriding member procedure before_calling_suite(self in out nocopy ut_documentation_reporter, a_suite ut_logical_suite),
overriding member procedure after_calling_test(self in out nocopy ut_documentation_reporter, a_test ut_test),
overriding member procedure after_calling_after_all (self in out nocopy ut_documentation_reporter, a_executable in ut_executable),
Expand Down
4 changes: 4 additions & 0 deletions source/uninstall_objects.sql
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,10 @@ drop table ut_output_buffer_info_tmp$;

drop sequence ut_message_id_seq;

drop type ut_output_data_rows force;

drop type ut_output_data_row force;

drop type ut_results_counter force;

drop type ut_expectation_results force;
Expand Down