Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
86d4d0a
Initial check-in.
lwasylow Mar 18, 2022
f1f6d71
Tidy up code to make sure we got distinct set of expanded tests.
lwasylow Mar 19, 2022
1454221
Adding extra fields.
lwasylow Mar 23, 2022
ce4df28
Stage 3. Fixing error calls.
lwasylow Mar 29, 2022
273962b
Fixing issue with a non visible tests.
lwasylow Mar 29, 2022
a753e66
Fixing ORA-600
lwasylow Mar 30, 2022
0d8d34d
Cleanup Phase1.
lwasylow Mar 30, 2022
95ddec1
Adding tests.
lwasylow Mar 31, 2022
83dbdaa
Updating documentation.
lwasylow Mar 31, 2022
52c0307
Addresing sonar issues
lwasylow Mar 31, 2022
8f8d257
Extra tests and cleanup of old code.
lwasylow Apr 1, 2022
12be123
Adding extra tests
lwasylow Apr 1, 2022
d5ee6ca
Updating SQL to expand paths and extract suites.
lwasylow Apr 1, 2022
2db8d63
Addressing issue with reconstruct_cache knocking off other levels.
lwasylow Apr 6, 2022
d3396fe
Update tests for random order
lwasylow Apr 7, 2022
02d41a6
Removing a hash function from api into utils package which is more su…
lwasylow Apr 7, 2022
274d80a
Fixing ordering
lwasylow Apr 7, 2022
3937737
Fixing a documentation
lwasylow Apr 7, 2022
9296f38
Fixing indent
lwasylow Apr 7, 2022
6ff7f38
Peer review changes
lwasylow Apr 12, 2022
ee7a98b
Moving a SQL to be more readable.
lwasylow Apr 12, 2022
a53cefa
Apply suggestions from code review
jgebal Apr 13, 2022
011970f
Apply suggestions from code review
jgebal Apr 13, 2022
71e07f9
Merge remote-tracking branch 'origin/develop' into feature/call_tests…
jgebal Apr 15, 2022
221c2de
Address issue of not recognizing a correct nested level of suitepath.
lwasylow Apr 16, 2022
870cfe4
Merge branch 'feature/call_tests_by_part_of_name' of https://github.c…
lwasylow Apr 16, 2022
51439d8
Update documentation
lwasylow Apr 16, 2022
0fc7ff6
Fixing issue where parition by only path caused a duplicate level 1 a…
lwasylow Apr 16, 2022
647b830
Fixed issue with suites getting duplicated when running tests across …
jgebal Apr 17, 2022
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
Prev Previous commit
Next Next commit
Update tests for random order
  • Loading branch information
lwasylow committed Apr 7, 2022
commit d3396fef1fce55d8e25828e99aa2556ad3e336e5
40 changes: 4 additions & 36 deletions source/core/ut_suite_cache_manager.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -88,40 +88,6 @@ create or replace package body ut_suite_cache_manager is
return l_result;
end;

function get_random_seed_sql(a_random_seed positive) return varchar2 is
begin
return case
when a_random_seed is null then q'[
nlssort(
replace(
/*suite path until objects name (excluding contexts and test path) with trailing dot (full stop)*/
substr( c.obj.path, 1, instr( c.obj.path, lower(c.obj.object_name), -1 ) + length(c.obj.object_name) ),
'.',
/*'.' replaced with chr(0) to assure that child elements come before parent when sorting in descending order*/
chr(0)
),
'nls_sort=binary'
)desc nulls last,
case when c.obj.self_type = 'UT_SUITE_CONTEXT' then
( select /*+ no_parallel */ max( x.line_no ) + 1
from ut_suite_cache x
where c.obj.object_owner = x.object_owner
and c.obj.object_name = x.object_name
and x.path like c.obj.path || '.%'
)
else
c.obj.line_no
end,
/*assures that child contexts come before parent contexts*/
regexp_count(c.obj.path,'\.') desc,
:a_random_seed]'
else
' ut_runner.hash_suite_path(
c.obj.path, :a_random_seed
) desc nulls last'
end;
end;

function group_paths_by_schema(a_paths ut_varchar2_list) return ut_path_items is
c_package_path_regex constant varchar2(100) := '^([A-Za-z0-9$#_]+)(\.([A-Za-z0-9$#_\*]+))?(\.([A-Za-z0-9$#_\*]+))?$';
l_results ut_path_items := ut_path_items();
Expand Down Expand Up @@ -302,7 +268,9 @@ create or replace package body ut_suite_cache_manager is
begin
with
extract_parent_child as (
select s.path, substr(s.path,1,instr(s.path,'.',-1,1)-1) as parent_path,s.object_owner,s.line_no,a_random_seed random_seed
select s.path, substr(s.path,1,instr(s.path,'.',-1,1)-1) as parent_path,s.object_owner,
case when a_random_seed is null then s.line_no else null end line_no,
case when a_random_seed is null then null else ut_runner.hash_suite_path(s.path, a_random_seed) end random_seed
from table(a_suite_rows) s),
t1(path,parent_path,object_owner,line_no,random_seed) as (
--Anchor memeber
Expand All @@ -315,7 +283,7 @@ create or replace package body ut_suite_cache_manager is
from t1,extract_parent_child t2
where t2.parent_path = t1.path
and t1.object_owner = t2.object_owner)
search depth first by line_no desc,random_seed set order1
search depth first by line_no desc,random_seed desc nulls last set order1
select value(i) as obj
bulk collect into l_suite_rows
from t1 c
Expand Down
2 changes: 1 addition & 1 deletion test/ut3_user/api/test_ut_run.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ Failures:%
l_results ut3_develop.ut_varchar2_list;
begin
select * bulk collect into l_random_results
from table ( ut3_develop.ut.run( 'ut3_tester_helper.test_package_1', a_random_test_order_seed => 3 ) )
from table ( ut3_develop.ut.run( 'ut3_tester_helper.test_package_1', a_random_test_order_seed => 6 ) )
where trim(column_value) is not null and column_value not like 'Finished in %'
and column_value not like '%Tests were executed with random order %';

Expand Down