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

Skip to content

Commit 91cc456

Browse files
authored
Merge branch 'develop' into feature/color_reporter
2 parents f227f17 + eb3fe7c commit 91cc456

3 files changed

Lines changed: 17 additions & 10 deletions

File tree

examples/between_string/test_betwnstr.pkg

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ create or replace package test_betwnstr as
1313

1414
-- %test(Returns null for null input string value)
1515
procedure null_string;
16+
17+
-- %test(Demo of a disabled test)
18+
-- %disable
19+
procedure disabled_test;
20+
1621
end;
1722
/
1823
create or replace package body test_betwnstr as
@@ -37,5 +42,10 @@ create or replace package body test_betwnstr as
3742
ut.expect( betwnstr( null, 2, 5 ) ).to_( be_null );
3843
end;
3944

45+
procedure disabled_test is
46+
begin
47+
ut.expect( betwnstr( null, null, null) ).not_to( be_null );
48+
end;
49+
4050
end;
4151
/

source/core/types/ut_test.tpb

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,17 @@ create or replace type body ut_test as
3636

3737
ut_utils.debug_log('ut_test.execute');
3838

39+
a_listener.fire_before_event(ut_utils.gc_test,self);
40+
self.start_time := current_timestamp;
41+
3942
if self.get_ignore_flag() then
4043
self.result := ut_utils.tr_ignore;
4144
ut_utils.debug_log('ut_test.execute - ignored');
42-
self.start_time := current_timestamp;
43-
self.end_time := current_timestamp;
45+
self.results_count := ut_results_counter(self.result);
46+
self.end_time := self.start_time;
4447
else
45-
46-
a_listener.fire_before_event(ut_utils.gc_test,self);
47-
4848
if self.is_valid() then
4949

50-
self.start_time := current_timestamp;
51-
5250
l_savepoint := self.create_savepoint_if_needed();
5351

5452
--includes listener calls for before and after actions
@@ -67,9 +65,8 @@ create or replace type body ut_test as
6765
end if;
6866
self.calc_execution_result();
6967
self.end_time := current_timestamp;
70-
a_listener.fire_after_event(ut_utils.gc_test,self);
71-
7268
end if;
69+
a_listener.fire_after_event(ut_utils.gc_test,self);
7370
return l_completed_without_errors;
7471
end;
7572

source/reporters/ut_xunit_reporter.tpb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ create or replace type body ut_xunit_reporter is
2020
begin
2121
self.print_text(
2222
'<testcase classname="'||get_path(a_test.path, a_test.name)||'" ' ||
23-
' assertions="'||a_test.results.count||'"' ||
23+
' assertions="'||coalesce(cardinality(a_test.results),0)||'"' ||
2424
self.get_common_item_attributes(a_test) ||
2525
' status="'||ut_utils.test_result_to_char(a_test.result)||'"' ||
2626
'>'

0 commit comments

Comments
 (0)