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 — No test found · Issue #156 · utPLSQL/utPLSQL-SQLDeveloper

No test found #156

New issue
Copy link
New issue
Copy link
Closed
Closed
No test found#156
Copy link
Assignees
PhilippSalvisberg
Labels
question

Description

@LydiaAzzoug
LydiaAzzoug
opened on Jul 18, 2022
Issue body actions

Hello,
Is your feature request related to a problem? Please describe.

I try to run the Test_addition package on both MBED4 and MBED4_TEST databases (sui is an MBED4 image) but it doesn't work (no test found). However running on the sgbd output gives the following script:
**
alltests
test_addition
myfunction [,106 sec] (FAILED - 1)

Failures:

  1. myfunction
    Actual: 2 (number) was expected to equal: 1 (number)
    at "MBED4_TEST.TEST_ADDITION.MYFUNCTION", line 18 ut.expect(l_actual).to_equal(l_expected);

Finished in ,128949 seconds
1 tests, 1 failed, 0 errored, 0 disabled, 0 warning(s)
**
Describe the solution you'd like
I executed this require: ALTER USER UT3 quota unlimited on UT_DATA; but i have the same problem
i also gave MBED4 AND MBED4_TEST all rights (execution , selection..):
begin
for i in (select * from all_OBJECTS where owner = 'POWERCARD' and object_type = 'TABLE' )
LOOP
EXECUTE IMMEDIATE 'GRANT SELECT ON '||I.OBJECT_NAME|| ' TO MBED4_TEST';
END LOOP;
end ;
...

Thank you in advance
MBED4
MBED4_TEST

Activity

  1. jgebal commented on Jul 18, 2022

    @jgebal
    jgebal
    on Jul 18, 2022
    Member
    More actions

    Hello @LydiaAzzoug

    Please do not use utPLSQL SQLDeveloper extension to report issues in utPLSQL. It makes it very hard to understand if the problem is with utPLSQL or with the extension. It also is harder to see what is going on.

    The best you could do is to report the errors from plain-text begin ut.run('MBED4_TEST.TEST_ADDITION'); end;
    This will produce output to the DBMS_OUTPUT.

    Also, when you are referencing "MBED4 and MBED4_TEST databases" I suspect you are not really talking about separate database instances that you connect to, but you are actually talking about different database schemas in a single database instance.

    Please try to use precise names. DATABASE, DATABASE INSTANCE and DATABASE SCHEMA are very different things.

    Anyway,
    It seems that you're struggling to understand why utPLSQL fails to execute the test-suite package.

    To help you understand what is required let me give you few tips.

    utPLSQL executed the tests as using the session and privileges of the connected user. It will always look for things to execute in context of CURRENT SCHEMA if not schema name is given when executing stuff.

    If you want to execute test suite TEST_ADDITION that exists in schema MBED4_TEST try running the following series of commands from sql worksheet in SQLDeveloper

    select username from all_users where username = 'MBED4_TEST';
    
    --will show the connected user name as well as the current schema of that user
    select user, sys_Context('userenv','current_schema') from dual;
    --will show a record with information about the test package and it's status 
    select object_name, object_type, status from all_objects where owner = 'MBED4_TEST' and object_name = 'TEST_ADDITION';
    --will show test package specification as it is in the database schema
    select line, text from all_source where owner = 'MBED4_TEST' and name = 'TEST_ADDITION' order by line;
    
    set serveroutput on
    
    --will execute the test procedure outside of utPLSQL framework runner.
    begin
      MBED4_TEST.TEST_ADDITION.myfunction;
    end;
    /
    --will run the test package using utPLSQL 
    begin
      ut.run('MBED4_TEST.TEST_ADDITION');
    end;
    /
    

    Please share the output from execution of the above script as TEXT (not as a screenshot)

    That way I can check and review what is cause of your problem.

  2. LydiaAzzoug commented on Jul 19, 2022

    @LydiaAzzoug
    LydiaAzzoug
    on Jul 19, 2022
    Author
    More actions

    hello,
    You will find attached two outputs, one for MBED4 and the other for MBED4_TEST

    DBMSOutput_MBED4_TEST.txt
    DBMSOutput_MBED4.txt

    Thank you in advance

  3. jgebal commented on Jul 19, 2022

    @jgebal
    jgebal
    on Jul 19, 2022
    Member
    More actions

    @LydiaAzzoug

    In both outputs it is clear that utPLSQL works and executes the tests.
    I really don't see this as a utPLSQL isssue. IT must be something related to SQLDeveloper or SQLDeveloper extension.

    Are you able to do a screen recording of the issue you are facing?

  4. LydiaAzzoug commented on Jul 19, 2022

    @LydiaAzzoug
    LydiaAzzoug
    on Jul 19, 2022 via email
    Author
    More actions
    NoTestFound.mp4 <https://drive.google.com/file/d/10kcO43eMB0cM-ioPyYy_4Nc-CTa0W93p/view?usp=drive_web> Le mar. 19 juil. 2022 à 11:27, Jacek Gębal ***@***.***> a écrit :
    …
    @LydiaAzzoug <https://github.com/LydiaAzzoug> In both outputs it is clear that utPLSQL works and executes the tests. I really don't see this as a utPLSQL isssue. IT must be something related to SQLDeveloper or SQLDeveloper extension. Are you able to do a screen recording of the issue you are facing? — Reply to this email directly, view it on GitHub <#156>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AXMUYD5PI7EKE6EA5O2TDMLVUZYHNANCNFSM534P453A> . You are receiving this because you were mentioned.Message ID: ***@***.***>
  5. pesse commented on Jul 19, 2022

    @pesse
    pesse
    on Jul 19, 2022
    Member
    More actions

    The video is very bad quality so I have a hard time to even see what packages are being run etc. Can you retry it with at least 640p, better 1080?

  6. jgebal commented on Jul 19, 2022

    @jgebal
    jgebal
    on Jul 19, 2022
    Member
    More actions

    I see the key issue. The issue is related to SQLDeveloper extension. The extension fails to run the tests for some reason.

    The tests run in Worksheet but no tests are found when running via SQLDeveloper - extension.
    I will move that issue to SQLDeveloper extension project

    @LydiaAzzoug - You will need to provide a bit more details:

    • version of SQLDeveloper
    • version of utPLSQL-SQLDeveloper extension

    @PhilippSalvisberg - anything else is needed?

  7. jgebal
    transferred this issue fromutPLSQL/utPLSQLon Jul 19, 2022
  8. PhilippSalvisberg commented on Jul 19, 2022

    @PhilippSalvisberg
    PhilippSalvisberg
    on Jul 19, 2022
    Member
    More actions

    When I look at the screen shot then I do not see a suite and test annotation. Therefore the message "no tests found" is correct.

  9. LydiaAzzoug commented on Jul 19, 2022

    @LydiaAzzoug
    LydiaAzzoug
    on Jul 19, 2022 via email
    Author
    More actions
    If I put the annotations, maybe it doesn't show with the bad quality create or replace package test_addition is
    …
    -- generated by utPLSQL for SQL Developer on 2022-07-05 13:13:00
    --%suite(ut3) --%suitepath(alltests)
    --%test procedure myfunction; end test_addition; Le mar. 19 juil. 2022 à 12:11, Philipp Salvisberg ***@***.***> a écrit :
    When I look at the screen shot then I do not see a suite and test annotation. Therefore the message "no tests found" is correct. — Reply to this email directly, view it on GitHub <#156 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AXMUYD2JIBCJXHNBJIAKY5TVUZ5OBANCNFSM537MOHMQ> . You are receiving this because you authored the thread.Message ID: ***@***.***>
  10. PhilippSalvisberg commented on Jul 19, 2022

    @PhilippSalvisberg
    PhilippSalvisberg
    on Jul 19, 2022
    Member
    More actions

    @LydiaAzzoug I can reproduce the problemn when I create a test package in the SQLDev editor but do not deploy it in the database.

    Please try the following:

    Create the following code in the SQLDev editor

    create or replace package test_addition is
    
       --%suite(ut3)
       --%suitepath(alltests)
    
       --%test
       procedure myfunction;
    
    end test_addition;
    /

    and deploy it by pressing Ctrl-Enter or by pressing this icon in the toolbar of the worksheet:

    image

    and then select run utPLSQL test from the context menu in the editor

    image

    In my SQLDev, the result looks like this:

    image

    Please try also to run the the following in a new SQLDev worksheet using the same connection as the one you used to deploy the test package:

    set serveroutput on size unlimited
    execute ut.run('test_addition');

    In my case the result looks like this:

    image

    What are the results in your case?

  11. LydiaAzzoug commented on Jul 19, 2022

    @LydiaAzzoug
    LydiaAzzoug
    on Jul 19, 2022 via email
    Author
    More actions
    I did the same steps but it does not work Le mar. 19 juil. 2022 à 13:51, Philipp Salvisberg ***@***.***> a écrit :
    …
    @LydiaAzzoug <https://github.com/LydiaAzzoug> I can reproduce the problemn when I create a procedure in the SQLDev editor but do not deploy it in the database. Please try the following: Create the following code in the SQLDev editor create or replace package test_addition is --%suite(ut3) --%suitepath(alltests) --%test procedure myfunction; end test_addition;/ and deploy it by pressing Ctrl-Enter or by pressing this icon in the toolbar of the worksheet: [image: image] <https://user-images.githubusercontent.com/3883171/179742215-a25717b6-b11c-47c8-8b60-2162f4732140.png> and then select run utPLSQL test from the context menu in the editor [image: image] <https://user-images.githubusercontent.com/3883171/179740970-c3a40566-28a8-4456-98e4-51cf388abe0c.png> In my SQLDev, the result looks like this: [image: image] <https://user-images.githubusercontent.com/3883171/179741250-806c7168-6f88-4455-9872-4fff2b8a5d89.png> Please try also to run the the following in a new SQLDev worksheet using the same connection as the one you used to deploy the test package: set serveroutput on size unlimited execute ut.run('test_addition'); In my case the result looks like this: [image: image] <https://user-images.githubusercontent.com/3883171/179741806-8db50713-5f79-472a-a631-1019c568d237.png> What are the results in your case? — Reply to this email directly, view it on GitHub <#156 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AXMUYD3AFUBNSWE7J246NN3VU2JCHANCNFSM537MOHMQ> . You are receiving this because you were mentioned.Message ID: ***@***.***>
  12. PhilippSalvisberg commented on Jul 19, 2022

    @PhilippSalvisberg
    PhilippSalvisberg
    on Jul 19, 2022
    Member
    More actions

    @LydiaAzzoug can you please post the result of

    set serveroutput on size unlimited
    execute ut.run('test_addition');

    Thank you.

  13. PhilippSalvisberg commented on Jul 19, 2022

    @PhilippSalvisberg
    PhilippSalvisberg
    on Jul 19, 2022
    Member
    More actions

    @LydiaAzzoug: Since we cannot reproduce the problem, we obviously miss something. utPLSQL seems to work fine. Just the SQL Developer extension does not find any tests. Right?

    Could you please provide all information to make the issue reproducible.

    1. Oracle SQL Database version
    2. utPLSQL version
    3. SQL Developer version
    4. utPLSQL for SQL Developer version
    5. Exact steps you are doing to run the tests. In text form or a video with a good resolution which is available on a public channel like youtube.
    6. The source of the test package

    Thanks.

  14. LydiaAzzoug commented on Jul 19, 2022

    @LydiaAzzoug
    LydiaAzzoug
    on Jul 19, 2022 via email
    Author
    More actions
    Hello, I solved the problem by running this query: sqlplus ***@***.*** @create_user_grants.sql ut3 hr finally it was because of synonyms and grants (I redid the installation) Thank you Le mar. 19 juil. 2022 à 14:14, Philipp Salvisberg ***@***.***> a écrit :
    …
    @LydiaAzzoug <https://github.com/LydiaAzzoug> can you please post the result of set serveroutput on size unlimited execute ut.run('test_addition'); Thank you. — Reply to this email directly, view it on GitHub <#156 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AXMUYD4RSTEWNWEGDLXX5XLVU2L2NANCNFSM537MOHMQ> . You are receiving this because you were mentioned.Message ID: ***@***.***>
  15. PhilippSalvisberg commented on Jul 19, 2022

    @PhilippSalvisberg
    PhilippSalvisberg
    on Jul 19, 2022
    Member
    More actions

    @LydiaAzzoug Thanks for letting us know.

    Still, this does not explain why the tests run in utPLSQL but not in the SQLDev extension. I still think we miss here something.

    However, since the issue is not reproducible on your side I close the issue.

    Reacted by LydiaAzzoug
  16. PhilippSalvisberg
    closed this as completedon Jul 19, 2022
  17. PhilippSalvisberg
    self-assigned this
    on Jul 19, 2022
  18. PhilippSalvisberg
    added
    question
    on Jul 19, 2022
  19. LydiaAzzoug commented on Oct 11, 2022

    @LydiaAzzoug
    LydiaAzzoug
    on Oct 11, 2022 via email
    Author
    More actions
    Le mar. 19 juil. 2022 à 14:14, Philipp Salvisberg ***@***.***> a écrit :
    @LydiaAzzoug <https://github.com/LydiaAzzoug> can you please post the result of set serveroutput on size unlimited execute ut.run('test_addition'); Thank you. — Reply to this email directly, view it on GitHub <#156 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AXMUYD4RSTEWNWEGDLXX5XLVU2L2NANCNFSM537MOHMQ> . You are receiving this because you were mentioned.Message ID: ***@***.***>
    alltests ut3 myfunction [,007 sec] (FAILED - 1) Failures: 1) myfunction Actual: 2 (number) was expected to equal: 1 (number) at "POWERCARD.TEST_ADDITION.MYFUNCTION", line 18 ut.expect(l_actual).to_equal(l_expected); Finished in ,010246 seconds 1 tests, 1 failed, 0 errored, 0 disabled, 0 warning(s) Procédure PL/SQL terminée.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @PhilippSalvisberg
    PhilippSalvisberg

Labels

question

Type

No type

Projects

No projects

    Milestone

    No milestone

    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.