Skip to content

Commit ee22669

Browse files
committed
Added test for multiple test outcomes in one go
1 parent 1e78987 commit ee22669

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

test/ut3_user/reporters/test_tap_reporter.pkb

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,18 @@ create or replace package body test_tap_reporter as
7070
ut.expect(ut3_tester_helper.main_helper.table_to_clob(l_output_data)).to_match(l_expected);
7171
end disabled_test_no_description;
7272

73+
74+
procedure multiple_tests_different_outcome as
75+
l_output_data ut3_develop.ut_varchar2_list;
76+
l_expected varchar2(32767);
77+
begin
78+
l_expected := q'[TAP version 14\s*1..1\s*# Subtest: org.*# Subtest: A suite for testing different outcomes from reporters\s{21}1..5\s{21}# <!beforeall!>\s{21}# Subtest: A description of some context\s{25}1..1\s{25}ok - passing_test\s{21}not ok - a test with failing assertion\s{23}---\s{23}message:.*not ok - a test raising unhandled exception\s{23}---\s{23}message: |.*ok - a disabled test # SKIP: Disabled for testing purpose.*ok - a disabled test with no reason # SKIP\s{21}# <!afterall!>\snot ok - org\s*]';
79+
80+
select *
81+
bulk collect into l_output_data
82+
from table(ut3_develop.ut.run('test_reporters',ut3_develop.ut_tap_reporter()));
83+
84+
ut.expect(ut3_tester_helper.main_helper.table_to_clob(l_output_data)).to_match(l_expected, 'n');
85+
end multiple_tests_different_outcome;
7386
end test_tap_reporter;
7487
/

test/ut3_user/reporters/test_tap_reporter.pks

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,8 @@ create or replace package test_tap_reporter as
1818
--%test(Skipped test without description)
1919
procedure disabled_test_no_description;
2020

21+
--%test(Multiple tests with different outcome)
22+
procedure multiple_tests_different_outcome;
23+
2124
end test_tap_reporter;
2225
/

0 commit comments

Comments
 (0)