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

Skip to content

Commit b7f7c8c

Browse files
committed
fixed documentation_reporter to print output
1 parent 341de8b commit b7f7c8c

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

source/reporters/ut_documentation_reporter.tpb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,17 @@ create or replace type body ut_documentation_reporter is
4444

4545
overriding member procedure after_calling_test(self in out nocopy ut_documentation_reporter, a_test ut_test) as
4646
l_message varchar2(4000);
47+
48+
procedure print_output(a_exectable ut_executable) is
49+
l_lines ut_varchar2_list;
50+
begin
51+
if a_exectable is not null and a_exectable.is_defined and a_exectable.serveroutput is not null and dbms_lob.getlength(a_exectable.serveroutput) > 0 then
52+
l_lines := ut_utils.clob_to_table(a_exectable.serveroutput);
53+
for i in 1..l_lines.count loop
54+
self.print_text(l_lines(i));
55+
end loop;
56+
end if;
57+
end;
4758
begin
4859
l_message := coalesce( a_test.description, a_test.name );
4960
--if test failed, then add it to the failures list, print failure with number
@@ -55,6 +66,11 @@ create or replace type body ut_documentation_reporter is
5566
failed_test_running_count := failed_test_running_count + 1;
5667
self.print_red_text(l_message || ' (FAILED - '||failed_test_running_count||')');
5768
end if;
69+
print_output(a_test.before_each);
70+
print_output(a_test.before_test);
71+
print_output(a_test.item);
72+
print_output(a_test.after_test);
73+
print_output(a_test.after_each);
5874
end;
5975

6076
overriding member procedure after_calling_suite(self in out nocopy ut_documentation_reporter, a_suite ut_logical_suite) as

0 commit comments

Comments
 (0)