I have a procedure which insert values into a table.
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;
/
on ut_documentation_reporter i have modified procedure after_calling_test the code to:
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 VARCHAR(1000);
l_test_status VARCHAR(100);
begin
l_message := coalesce(a_test.description, a_test.name)||' ['||round(a_test.execution_time,3)||' sec]';
--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';
--calling procedure
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';
--calling procedure
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';
--calling procedure
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;
the arguments are not being passed. neither can i print the value inside the procedure. I want to add the message the test status/description into an existing table.