GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add ability to run tests by part of a name. by lwasylow · Pull Request #1203 · utPLSQL/utPLSQL

Conversation

@lwasylow

@lwasylow lwasylow commented Mar 31, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
lwasylow added 8 commits March 18, 2022 16:33
@lwasylow
Initial check-in.
86d4d0a
There is still no error handling.
@lwasylow
Tidy up code to make sure we got distinct set of expanded tests.
f1f6d71
Addressing issue of WITH error ORA-32036: unsupported case for inlining of query name in WITH clause
@lwasylow
Adding extra fields.
1454221
@lwasylow
Stage 3. Fixing error calls.
ce4df28
@lwasylow
Fixing issue with a non visible tests.
273962b
@lwasylow
Fixing ORA-600
a753e66
@lwasylow
Cleanup Phase1.
0d8d34d
@lwasylow
Adding tests.
95ddec1
modifying code to cater for path with wildcard that can result in large item duplication due to parent/child search.
@github-actions

github-actions Bot commented Mar 31, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@codecov

codecov Bot commented Mar 31, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

lwasylow added 5 commits March 31, 2022 15:40
@lwasylow
Updating documentation.
83dbdaa
Adding get_suites_info override.
@lwasylow
Addresing sonar issues
52c0307
@lwasylow
Extra tests and cleanup of old code.
8f8d257
@lwasylow
Adding extra tests
12be123
@lwasylow
Updating SQL to expand paths and extract suites.
d5ee6ca
@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
@lwasylow lwasylow added the enhancement label Apr 1, 2022
jgebal
jgebal reviewed Apr 4, 2022
View reviewed changes

@jgebal jgebal left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this 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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread docs/userguide/running-unit-tests.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread docs/userguide/running-unit-tests.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread docs/userguide/running-unit-tests.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread docs/userguide/running-unit-tests.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread docs/userguide/running-unit-tests.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread source/core/types/ut_path_item.tpb Resolved

Uh oh!

There was an error while loading. Please reload this page.

@lwasylow

lwasylow commented Apr 4, 2022

Copy link
Copy Markdown
Member Author

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.

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

lwasylow added 5 commits April 7, 2022 00:24
@lwasylow
Addressing issue with reconstruct_cache knocking off other levels.
2db8d63
Solution was to introduce a sort order that work from bottom to top.
@lwasylow
Update tests for random order
d3396fe
@lwasylow
Removing a hash function from api into utils package which is more su…
02d41a6
…ited for it.
@lwasylow
Fixing ordering
274d80a
@lwasylow
Fixing a documentation
3937737
@lwasylow

lwasylow commented Apr 7, 2022

Copy link
Copy Markdown
Member Author

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

lwasylow added 3 commits April 7, 2022 13:24
@lwasylow
Fixing indent
9296f38
@lwasylow
Peer review changes
6ff7f38
@lwasylow
Moving a SQL to be more readable.
ee7a98b
@lwasylow
lwasylow requested a review from jgebal April 12, 2022 22:34
@jgebal
Apply suggestions from code review
a53cefa
jgebal
jgebal reviewed Apr 13, 2022
View reviewed changes
Comment thread source/core/ut_suite_cache_manager.pkb Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread source/core/ut_suite_cache_manager.pkb Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread source/core/ut_suite_cache_manager.pkb Resolved

Uh oh!

There was an error while loading. Please reload this page.

@jgebal
Apply suggestions from code review
011970f
@jgebal

jgebal commented Apr 15, 2022

Copy link
Copy Markdown
Member

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?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jgebal jgebal assigned lwasylow Apr 15, 2022
jgebal and others added 6 commits April 16, 2022 00:46
@jgebal
Merge remote-tracking branch 'origin/develop' into feature/call_tests…
71e07f9
…_by_part_of_name

# Conflicts:
#	source/core/ut_suite_manager.pkb
@lwasylow
Address issue of not recognizing a correct nested level of suitepath.
221c2de
Added extra tests for different scenarios.
@lwasylow
Merge branch 'feature/call_tests_by_part_of_name' of https://github.c…
870cfe4
…om/utPLSQL/utPLSQL into feature/call_tests_by_part_of_name
@lwasylow
Update documentation
51439d8
@lwasylow
Fixing issue where parition by only path caused a duplicate level 1 a…
0fc7ff6
…cross two owners being removed.
@jgebal
Fixed issue with suites getting duplicated when running tests across …
647b830
…multiple schemas
@sonarqubecloud

sonarqubecloud Bot commented Apr 17, 2022

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jgebal
jgebal approved these changes Apr 23, 2022
View reviewed changes
@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

Reviewers

@jgebal jgebal jgebal approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@lwasylow lwasylow

Labels

enhancement

Projects

None yet

Milestone

v3.1.13

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.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@lwasylow @jgebal
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.