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

Validate utPLSQL paths before running utPLSQL #5

Closed
PhilippSalvisberg opened this issue Jan 27, 2018 · 0 comments
Closed

Validate utPLSQL paths before running utPLSQL #5

PhilippSalvisberg opened this issue Jan 27, 2018 · 0 comments
Assignees
Milestone

Comments

@PhilippSalvisberg
Copy link
Member

In version 0.1 every package is considered a test suite and every package procedure is considered a test. If this is not true a error message similar to the following is shown in the script output panel:

Error starting at line : 2 in command -
BEGIN ut.run('PLSCOPE.LINEAGE_UTIL'); END;
Error report -
ORA-20204: Suite package plscope.lineage_util not found
ORA-06512: at "UT3.UT_RUNNER", line 101
ORA-06512: at "UT3.UT_SUITE_MANAGER", line 245
ORA-06512: at "UT3.UT_SUITE_MANAGER", line 305
ORA-06512: at "UT3.UT_RUNNER", line 84
ORA-06512: at "UT3.UT", line 105
ORA-06512: at "UT3.UT", line 272
ORA-06512: at "UT3.UT", line 324
ORA-06512: at line 1

Starting with utPLSQL v3.0.4 it is possible to get a list of annotations (Thanks to @jgebal for the example queries)

Annotated objects:

SELECT o.object_owner, o.object_type, o.object_name, o.annotations
  FROM TABLE(ut3.ut_annotation_manager.get_annotated_objects(USER, 'PACKAGE')) o;

All annotations:

SELECT o.object_owner, o.object_type, o.object_name, a.name, a.text, a.subobject_name
  FROM TABLE(ut3.ut_annotation_manager.get_annotated_objects(USER, 'PACKAGE')) o
 CROSS JOIN TABLE(o.annotations) a;

These queries should be used for the following:

  • disable a Run utPLSQL test menu entry, if no test exists for the selected scope
  • enable a Run utPLSQL testmenu entry, if one or more tests exist for the selected scope
  • consider only test procedures when evaluating the test procedure at a PL/SQL editor cursor position

If a utPLSQL version less than 3.0.4 is used than the extension should still work, but will not validate utPLSQL paths (as in v0.1).

@PhilippSalvisberg PhilippSalvisberg self-assigned this Jan 27, 2018
@PhilippSalvisberg PhilippSalvisberg added this to the v0.2.0 milestone Jan 28, 2018
PhilippSalvisberg added a commit that referenced this issue Jan 30, 2018
enable/disable "Run utPLSQL test" context menu item in Connections
navigator window
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant