Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Exclude Objects from code coverage by wildcard #1053
Comments
We would need to make few decisions here:
For No. 1 - I don't have an strong opinion, but whatever we choose should be taken as standard. No other input parameters accept wildcards so far so this would lay foundations for future enhancements in other areas. For No. 2 - I would lean towards reuse of existing parameters. They would simply become more flexible. I didn't check the code yet but as far as I remember it shouldn't be too hard to implement. |
Here are my 2 cents:
|
I was thinking a bit. Given the above and the fact that filtering objects by using Wildcard filtering using With that, the only way to introduce full wildcards in a non-breaking way would be to use OS-style substitution characters:
Another option would be to use Oracle wildcard matching but only to support A mixed option would be to allow for use of The more I think about it the more I lean towards using OS-style substitution characters. Examples: begin
ut.run(
'unit_test_schema', ut_coverage_html_reporter(),
a_include_objects => ut_varchar2_list(
'user_???.bonus*',
'???_user.*_process_*'
),
a_exclude_objects => ut_varchar2_list(
'user_???.*award*',
'???_user.*calc*'
)
);
end; @pesse @lwasylow @PhilippSalvisberg - any inputs from your side? |
Current documentation can be found here for reference |
Relates to: #470 |
@jgebal I agree with your proposal since it simplifies the handling of unquoted identifiers. However, it will make it more difficult in the future to support quoted identifiers (e.g.
|
Like idea of @PhilippSalvisberg. Nice granularity level enough to cover most requirements. I think simple like of oracle will be sufficient. Unfortunately any new input parameters will explode into load number of ut run overloads so maybe its time to introduce a new subtype that will go into include objects exclude objects that is a tab of varchar2 etc.? That way we keep old functionality not break and reduce new specs |
@lwasylow We would need to enforce precedence of parameters when both This can be done in few ways:
That way it should be relatively easy to implement |
Is your feature request related to a problem? Please describe.
We have a database schema which includes temporary objects - this means objects which are required only for a short time like procedure for upgrades or objects which are still work in progress - and legacy test code. Temporary objects are always prefixed with the username of the author like:
windowsusr_my_table
Test Procedures are prefixed with test_ and cannot be moved to utPLSQL because they do an integration test rather than a unit test as they access and read data from remote systems and therefore need manual checks of the data.
Describe the solution you'd like
We would like to exclude objects using a wildcard like:
windowsusr_*
test_*
Describe alternatives you've considered
I tried to list every object which currently exists and which should be excluded but gave up after about 15 names.
Additional context
We use Oracle 12.1 with Sqldeveloper and installed the utPLSQL plugin.