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

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fixes to bug introduced in revision
Revision: c787e47
* Added support for multiple occurrences of before and after blocks.

that removed a path from ut_suite_item.tpb and move to suite_builder missing a lower case transformation for object name and procedure name.
  • Loading branch information
lwasylow committed May 12, 2018
commit 846f76ab6e380ba44c850163fbcbd0ece9d65ae8
4 changes: 2 additions & 2 deletions source/core/ut_suite_builder.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,15 @@ create or replace package body ut_suite_builder is
l_annotation_pos binary_integer;
begin
l_result.owner := a_object.object_owner;
l_result.name := a_object.object_name;
l_result.name := lower(trim(a_object.object_name));
l_annotation_no := a_object.annotations.first;
while l_annotation_no is not null loop
l_annotation_pos := a_object.annotations(l_annotation_no).position;
if a_object.annotations(l_annotation_no).subobject_name is null then
l_result.annotations(l_annotation_pos).name := a_object.annotations(l_annotation_no).name;
l_result.annotations(l_annotation_pos).text := a_object.annotations(l_annotation_no).text;
else
l_result.annotations(l_annotation_pos).procedure_name := a_object.annotations(l_annotation_no).subobject_name;
l_result.annotations(l_annotation_pos).procedure_name := lower(trim(a_object.annotations(l_annotation_no).subobject_name));
l_result.annotations(l_annotation_pos).procedure_annotations := get_procedure_annotations(a_object.annotations, l_annotation_no);
end if;
l_annotation_no := a_object.annotations.next(l_annotation_no);
Expand Down
33 changes: 33 additions & 0 deletions test/core/reporters/test_junit_reporter.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,18 @@ create or replace package body test_junit_reporter as
procedure test1 is begin ut.expect(1).to_equal(1); end;
end;]';


execute immediate q'[create or replace package Tst_Fix_Case_Sensitive as
--%suite

--%test(bugfix)
procedure bUgFiX;
end;]';

execute immediate q'[create or replace package body Tst_Fix_Case_Sensitive as
procedure bUgFiX is begin ut.expect(1).to_equal(1); end;
end;]';

reporters.reporters_setup;

end;
Expand Down Expand Up @@ -267,6 +279,27 @@ create or replace package body test_junit_reporter as
ut.expect(l_actual).to_be_like(l_expected);
end;

procedure check_classname_is_populated is
l_results ut3.ut_varchar2_list;
l_actual clob;
l_expected varchar2(32767):= q'[<testsuites tests="1" disabled="0" errors="0" failures="0" name="" time="%" >
<testsuite tests="1" id="1" package="tst_fix_case_sensitive" disabled="0" errors="0" failures="0" name="tst_fix_case_sensitive" time="%" >
<testcase classname="tst_fix_case_sensitive" assertions="0" name="bugfix" time="%" >
<system-out/>
<system-err/>
</testcase>
<system-out/>
<system-err/>
</testsuite>
</testsuites>]';
begin
select *
bulk collect into l_results
from table(ut3.ut.run('Tst_Fix_Case_Sensitive',ut3.ut_junit_reporter()));
l_actual := ut3.ut_utils.table_to_clob(l_results);
ut.expect(l_actual).to_be_like(l_expected);
end;

procedure remove_test_package is
pragma autonomous_transaction;
begin
Expand Down
9 changes: 6 additions & 3 deletions test/core/reporters/test_junit_reporter.pks
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,17 @@ create or replace package test_junit_reporter as
--%test(Reports duration according to XML specification for numbers)
procedure check_nls_number_formatting;

--%test(Report on test without description)
--%test(Report on test without description)
procedure report_test_without_desc;

--%test(Report on suite without description)
--%test(Report on suite without description)
procedure report_suite_without_desc;

--%test(Report produces expected output)
--%test(Report produces expected output)
procedure reporort_produces_expected_out;

--%test( Test for bug #659)
procedure check_classname_is_populated;

--%afterall
procedure remove_test_package;
Expand Down