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

Conversation

lwasylow
Copy link
Member
@lwasylow lwasylow commented Mar 31, 2022

Introducing a capability to call tests by part of name.
We can call out using path or object name / procedure name.
Schema name has to be defined.
This will allow to simplify a syntax for multiple tests / suites e.g.

begin
 ut3_develop.ut.run( 'ut3:*_package*');
end;
/

or

begin
 ut3_develop.ut.run( 'ut3.test_package_*');
end;
/

Closes #470
Closes #1148

There is still no error handling.
Addressing issue of WITH error ORA-32036: unsupported case for inlining of query name in WITH clause
modifying code to cater for path with wildcard that can result in large item duplication due to parent/child search.
@github-actions
Copy link
Contributor
github-actions bot commented Mar 31, 2022

Unit Test Results

       1 files         2 suites   4m 31s ⏱️
1 025 tests 1 021 ✔️ 4 💤 0
1 028 runs  1 020 ✔️ 8 💤 0

Results for commit 647b830.

♻️ This comment has been updated with latest results.

@codecov
Copy link
codecov bot commented Mar 31, 2022

Codecov Report

Merging #1203 (647b830) into develop (86357f2) will increase coverage by 0.10%.
The diff coverage is 99.16%.

@@             Coverage Diff             @@
##           develop    #1203      +/-   ##
===========================================
+ Coverage    94.39%   94.49%   +0.10%     
===========================================
  Files          107      108       +1     
  Lines         5063     5086      +23     
  Branches        22       22              
===========================================
+ Hits          4779     4806      +27     
+ Misses         276      273       -3     
+ Partials         8        7       -1     
Flag Coverage Δ
11XE 93.79% <99.16%> (+0.15%) ⬆️
12.1EE 93.87% <99.16%> (+0.11%) ⬆️
18XE 94.12% <99.16%> (+0.08%) ⬆️
21XE 94.30% <99.16%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
source/core/ut_utils.pkb 94.44% <94.44%> (+0.25%) ⬆️
source/api/ut_runner.pkb 96.03% <100.00%> (+0.71%) ⬆️
source/core/types/ut_path_item.tpb 100.00% <100.00%> (ø)
source/core/ut_suite_cache_manager.pkb 97.43% <100.00%> (+0.42%) ⬆️
source/core/ut_suite_manager.pkb 97.20% <100.00%> (+1.39%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6751290...647b830. Read the comment docs.

@lwasylow lwasylow requested a review from jgebal April 1, 2022 10:40
@lwasylow lwasylow added this to the 3.1.13 milestone Apr 1, 2022
Copy link
Member
@jgebal jgebal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see a problem with this PR (besides the specific comments)

Only 329 tests get executed when this branch is used as source for installing into UT3 schema. So it looks like only tests from one schema are executed. See here

That indicates there is a regression bug/problem that is not captured by existing unit tests.

@lwasylow
Copy link
Member Author
lwasylow commented Apr 4, 2022

I see a problem with this PR (besides the specific comments)

Only 329 tests get executed when this branch is used as source for installing into UT3 schema. So it looks like only tests from one schema ar 8000 e executed. See here

That indicates there is a regression bug/problem that is not captured by existing unit tests.

Thats interesting, good spot...
I will check it out, there are two places where I this can go wrong here, either expand paths or get cached suits sql.

@lwasylow
Copy link
Member Author
lwasylow commented Apr 7, 2022

I see a problem with this PR (besides the specific comments)

Only 329 tests get executed when this branch is used as source for installing into UT3 schema. So it looks like only tests from one schema are executed. See here

That indicates there is a regression bug/problem that is not captured by existing unit tests.

So that was caused by sorting of paths before passing to reconstruc_cache . There were scenarios were a level 2 could appear right after level 3 but been then followed by level 3 again. This should not be an issue with a single sequential check however in current situation I have changed a code to order by siblings. I also slightly modified place where ordering is happening however I believe the sorting by siblings get a better results than nls_sort.

@lwasylow lwasylow requested a review from jgebal April 12, 2022 22:34
@jgebal
Copy link
Member
jgebal commented Apr 15, 2022

There are tests missing for:

  • wildcard in beginning
  • wildcard in the middle
  • multiple wildcards

Documentation also does not mention that wildcard can be used in any part of path/object_name/procedure_name

So does it mean that wildcard is allowed only at the end of the search string or should the doc & tests be updated?

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 12 Code Smells

99.2% 99.2% Coverage
0.0% 0.0% Duplication

@lwasylow lwasylow merged commit de6552a into develop Apr 23, 2022
@jgebal jgebal deleted the feature/call_tests_by_part_of_name branch October 17, 2022 07:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is there a way I can run only specific tests (test packages starting with XX%, etc)? Add ability to run tests by part of a name.
2 participants
0