Skip to content
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

No coverage data, when running with a_include_objects from different schema #511

Closed
jgebal opened this Issue Nov 8, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@jgebal
Copy link
Member

jgebal commented Nov 8, 2017

When I execute the tests as below:

alter session set current_schema=other_schema;

select *
  from table(
    ut.run(
      user, 
      ut_coverage_html_reporter(),
      a_include_objects => ut_varchar2_list( user||'.betwnstr')
    )
  );

The coverage report is empty.
I need to explicitly specify a_coverage_schemes=>ut_varchar2_list( user ) as a parameter, even though the owner of the object is included as part of the a_include_objects parameter.

The behavior should be:

a_include_objects a_coverage_schemes a_source_file_mappings coverage filtering
null null null all objects (except tests) in current_schema
specified null null all objects (except tests) from the list specified (as per schemes on the object list)
null specified null all objects in schemes specified (except unit tests)
null null specified all objects (except tests) from the file mapping list (as per schemes on the list)

It doesn't really make sense to support combinations of those 3 parameters.
Those parameters should be mutually exclusive.
So users should only provide one of parameters not a combination of those.

Current implementation sets value of a_coverage_schemes to be CURRENT_SCHEMA, if not value was provided. This makes the a_include_objects filter useless without specifying schema names.

@jgebal jgebal added the bug label Nov 8, 2017

@pesse

This comment has been minimized.

Copy link
Member

pesse commented Nov 9, 2017

I guess to solve this you'll change the public API of ut_runner, won't you? I think any change has also be included in Java-API and CLI

@jgebal

This comment has been minimized.

Copy link
Member Author

jgebal commented Nov 9, 2017

I will start by fixing the functionality.
Are you OK with this change?

@pesse

This comment has been minimized.

Copy link
Member

pesse commented Nov 9, 2017

Yes of course, finally got myself into both, API and CLI so I'm ready to update them if there are any changes to public API. Will also create an issue in Java-API-Project

jgebal added a commit that referenced this issue Nov 12, 2017

Fixed coverage filtering issue.
Coverage can now be gathered with `a_include_objects` parameter
Resolves #511

@jgebal jgebal added this to the v3.0.5 milestone Nov 12, 2017

@jgebal jgebal self-assigned this Nov 12, 2017

@jgebal jgebal added the in progress label Nov 12, 2017

@jgebal jgebal closed this in #512 Nov 24, 2017

@jgebal jgebal modified the milestones: v3.0.5, v3.1.0 Feb 28, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.