I'm executing a procedure in another procedure.
Procedure 1:
CREATE OR REPLACE PROCEDURE proc_test_status_table(
p_test_description IN VARCHAR2,
p_test_status IN varchar2)
AS
l_sql VARCHAR2(4000);
BEGIN
l_sql := 'insert into test_status_table(test_description, test_status)
values
( '''||p_test_description||''',
'''||p_test_status||''')';
EXECUTE IMMEDIATE (l_sql);
END;
/
Procedure 2:
overriding member procedure after_calling_test(self in out nocopy ut_documentation_reporter, a_test ut_test) as
l_message varchar2(4000);
l_test_description VARCHAR2(1000);
l_test_status VARCHAR2(100);
begin
l_message := coalesce(a_test.description, a_test.name)||' ['||round(a_test.execution_time,3)||' sec]';
Dbms_Output.Put_Line(a_test.result||'test_result');
--if test failed, then add it to the failures list, print failure with number
if a_test.result = ut_utils.gc_disabled then
self.print_yellow_text(l_message || ' (DISABLED)');
l_test_description := 'DISABLED';
proc_test_status_table(l_message, l_test_description);
elsif a_test.result = ut_utils.gc_success then
self.print_green_text(l_message);
l_test_description := 'PASS';
proc_test_status_table(l_message, l_test_description);
elsif a_test.result > ut_utils.gc_success then
failed_test_running_count := failed_test_running_count + 1;
self.print_red_text(l_message || ' (FAILED - ' || failed_test_running_count || ')');
l_test_description := 'FAIL';
proc_test_status_table(l_message, l_test_description);
end if;
-- reproduce the output from before/after procedures and the test
self.print_clob(a_test.get_serveroutputs);
end;
It doesn't store the message and description in test_status_table table, but when I print them it gets displayed.
Am I doing something wrong?