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 — Run utPLSQL test greyed out in Schema Browser (other schema and own schema) · Issue #111 · utPLSQL/utPLSQL-SQLDeveloper

Run utPLSQL test greyed out in Schema Browser (other schema and own schema) #111

New issue
Copy link
New issue
Copy link
Closed
#115
Closed
Run utPLSQL test greyed out in Schema Browser (other schema and own schema)#111
#115
Copy link
Assignees
PhilippSalvisberg
Labels
bug
Milestone
v1.2.1

Description

@mhoys
mhoys
opened on Aug 21, 2020
Issue body actions

Hi,
I'm using the utPLSQL extension version 1.2.0 with SQL Developer 19.4.
I can right-click in the connections window and run utPLSQL tests on packages in my own schema, but I cannot do this on packages in another schema - the utPLSQL options are greyed out. Any idea what could be causing this? If I run them like this from my own schema, it works fine:

set serveroutput on
begin
ut.run('other_schema.ut_package');
end;

PS: I have enough rights to create and execute objects in the other schema.

Thanks
Matthias

Activity

  1. PhilippSalvisberg commented on Aug 22, 2020

    @PhilippSalvisberg
    PhilippSalvisberg
    on Aug 22, 2020
    Member
    More actions

    In the following scenario I'm connected to UT3_TESTER_HELPER (your user) and select under the node Other Users the test package TEST_OUTPUT_BUFFER owned by UT3_TESTER (your other_schema). And then I right-click on this node to show the context menu.

    image

    The statement log shows the code executed behind the scenes to determine if a package can be executed. The code may differ depending on the installed utPLSQL version (that's why it is important to know which version of utPLSQL you are using). In my case I use the most recent develop version v3.1.11.3466-develop). The code looks like this when showing the cell value of the SQL column:

    DECLARE
       l_return VARCHAR2(1) := '0';
    BEGIN
       IF ut_runner.is_suite(?, ?) THEN
          l_return := '1';
       END IF;
       ? := l_return;
    END;

    The bind variables UT3_TESTER and TEST_OUTPUT_BUFFER are used as you see on the parameters column. Based on that I can run an adapted version of the code in my worksheet as well, e.g. as follows:

    SET SERVEROUTPUT ON
    DECLARE
       l_return VARCHAR2(1) := '0';
    BEGIN
       IF ut_runner.is_suite('UT3_TESTER', 'TEST_OUTPUT_BUFFER') THEN
          l_return := '1';
       END IF;
       dbms_output.put_line(l_return);
    END;
    /

    In my chase the output is:

    1
    
    PL/SQL procedure successfully completed.
    

    So, I assume that in your case 0 is returned and that leads to a disabled Run utPLSQL test context menu entry.

  2. PhilippSalvisberg
    self-assigned this
    on Aug 22, 2020
  3. PhilippSalvisberg
    added
    question
    on Aug 22, 2020
  4. mhoys commented on Aug 23, 2020

    @mhoys
    mhoys
    on Aug 23, 2020
    Author
    More actions

    Hi Philipp,

    We are using utPLSQL version v3.1.9.3270.

    I executed your piece of PL/SQL code and it returned 1 in my case, so this looks ok.

    However, I have found something else based on your feedback.
    I normally browse to the objects of other users by right-clicking in my schema name in the connections window, then choose "Schema Browser" and select the required schema. The utPLSQL options are greyed out there! However, when I try it your way and open the other schema from the "Other Users" folder in my schema, it works fine and the utPLSQL context menu is correctly enabled! Can you reproduce this behaviour? Let me know if you need more information.

    Thanks,
    Matthias

  5. PhilippSalvisberg commented on Aug 23, 2020

    @PhilippSalvisberg
    PhilippSalvisberg
    on Aug 23, 2020
    Member
    More actions

    Yes, I can reproduce it.

    image

    It looks like it's not possible to select test packages in the Schema Browser. It does not matter which schema is selected. Does not work with the own schema schema. I consider this a bug. Thank you for reporting it.

  6. PhilippSalvisberg
    added
    bug
    and removed
    question
    on Aug 23, 2020
  7. PhilippSalvisberg
    changed the title [-]Run utPLSQL test greyed out in other schema[/-] [+]Run utPLSQL test greyed out in Schema Browser (other schema and own schema)[/+] on Aug 23, 2020
  8. PhilippSalvisberg
    added this to the v1.3.0 milestone on Aug 23, 2020
  9. mhoys commented on Aug 23, 2020

    @mhoys
    mhoys
    on Aug 23, 2020
    Author
    More actions

    Thanks, good to know it's a bug and not something related to my configuration ;-)

  10. mhoys
    closed this as completedon Aug 23, 2020
  11. mhoys commented on Aug 23, 2020

    @mhoys
    mhoys
    on Aug 23, 2020
    Author
    More actions

    (oops maybe I should better not close this one)

  12. mhoys
    reopened this on Aug 23, 2020
  13. PhilippSalvisberg
    closed this as completedin #115on Oct 18, 2020
  14. PhilippSalvisberg
    modified the milestones: v1.3.0, v1.2.1 on Oct 18, 2020
  15. mhoys commented on Oct 21, 2020

    @mhoys
    mhoys
    on Oct 21, 2020
    Author
    More actions

    Thanks, I can confirm it's working fine now (I tried v1.2.1 with SQL Developer 20.2).

    Reacted by Philipp Salvisberg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @PhilippSalvisberg
    PhilippSalvisberg

Labels

bug

Type

No type

Projects

No projects

    Milestone

    • v1.2.1

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    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.