8000 Add ability to run tests by part of a name. by lwasylow · Pull Request #1203 · utPLSQL/utPLSQL · GitHub
[go: up one dir, main page]

Skip to content

Add ability to run tests by part of a name. #1203

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 29 commits into from
Apr 23, 2022
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
Extra tests and cleanup of old code.
  • Loading branch information
lwasylow committed Apr 1, 2022
commit 8f8d257fc9de8f71eb6ed83bb62194f9fadef359
18 changes: 0 additions & 18 deletions source/core/ut_suite_cache_manager.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -290,24 +290,6 @@ create or replace package body ut_suite_cache_manager is
return expand_paths(group_paths_by_schema(a_paths));
end;

function get_cached_suite_rows(
a_object_owner varchar2,
a_path varchar2 := null,
a_object_name varchar2 := null,
a_procedure_name varchar2 := null,
a_random_seed positive := null,
a_tags ut_varchar2_rows := null
) return ut_suite_cache_rows is
l_tags ut_varchar2_rows := coalesce(a_tags,ut_varchar2_rows());
l_object_owner varchar2(250) := ut_utils.qualified_sql_name(a_object_owner);
l_object_name varchar2(250) := ut_utils.qualified_sql_name(a_object_name);
l_procedure_name varchar2(250) := ut_utils.qualified_sql_name(a_procedure_name);
l_schema_paths ut_path_items;
begin
l_schema_paths := ut_path_items(ut_path_item(l_object_owner,l_object_name,l_procedure_name,a_path));
return get_cached_suite_rows(l_schema_paths,a_random_seed,l_tags);
end;

function get_cached_suite_rows(
a_schema_paths ut_path_items,
a_random_seed positive := null,
Expand Down
11 changes: 1 addition & 10 deletions source/core/ut_suite_cache_manager.pks
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,13 @@ create or replace package ut_suite_cache_manager authid definer is
* Not to be used publicly. Used internally for building suites at runtime.
*/
function get_cached_suite_rows(
a_object_owner varchar2,
a_path varchar2 := null,
a_object_name varchar2 := null,
a_procedure_name varchar2 := null,
a_schema_paths ut_path_items,
a_random_seed positive := null,
a_tags ut_varchar2_rows := null
) return ut_suite_cache_rows;

function get_schema_paths(a_paths in ut_varchar2_list) return ut_path_items;

function get_cached_suite_rows(
a_schema_paths ut_path_items,
a_random_seed positive := null,
a_tags ut_varchar2_rows := null
) return ut_suite_cache_rows;

/*
* Retrieves suite item info rows from cache.
* Returned data is not filtered by user access rights.
Expand Down
32 changes: 32 additions & 0 deletions test/ut3_user/api/test_ut_runner.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,38 @@ end;';
ut.expect(l_actual).to_equal(l_expected);
end;

procedure test_get_suites_info_by_path is
l_expected sys_refcursor;
l_actual sys_refcursor;
begin
--Arrange
open l_expected for
select
'UT3_USER' object_owner, 'DUMMY_TEST_PACKAGE' object_name, 'DUMMY_TEST_PACKAGE' item_name,
'dummy_test_suite' item_description, 'UT_SUITE' item_type, 2 item_line_no,
'some.path.dummy_test_package' path, 0 disabled_flag, null disabled_reason,null tags
from dual union all
select
'UT3_USER' object_owner, 'DUMMY_TEST_PACKAGE' object_name, 'SOME_DUMMY_TEST_PROCEDURE' item_name,
'dummy_test' item_description, 'UT_TEST' item_type, 6 item_line_no,
'some.path.dummy_test_package.some_dummy_test_procedure' path, 0 disabled_flag, null disabled_reason,null tags
from dual union all
select
'UT3_USER' object_owner, 'PATH' object_name, 'PATH' item_name,
null item_description, 'UT_LOGICAL_SUITE' item_type, null item_line_no,
'some.path' path, 0 disabled_flag, null disabled_reason, null tags
from dual union all
select
'UT3_USER' object_owner, 'SOME' object_name, 'SOME' item_name,
null item_description, 'UT_LOGICAL_SUITE' item_type, null item_line_no,
'some' path, 0 disabled_flag, null disabled_reason, null tags
from dual;
--Act
open l_actual for select * from table(ut3_develop.ut_runner.get_suites_info('ut3_user:some.path.dummy_test_package'));
--Assert
ut.expect(l_actual).to_equal(l_expected);
end;

procedure test_get_reporters_list is
l_expected sys_refcursor;
l_actual sys_refcursor;
Expand Down
5 changes: 5 additions & 0 deletions test/ut3_user/api/test_ut_runner.pks
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ create or replace package test_ut_runner is
--%aftertest(cleanup_cache)
procedure test_get_suites_info_twotag;

--%test(get_suites_info returns a cursor containing records for a newly created test with passed path)
--%beforetest(setup_cache_objects)
--%aftertest(cleanup_cache)
procedure test_get_suites_info_by_path;

--%test(get_reporters_list returns a cursor containing all built-in reporters and information about output-reporter)
--%beforetest(setup_cache_objects)
--%aftertest(cleanup_cache)
Expand Down
0