Menu

No Tests found while utPLSQL execution

eswar
2015-04-13
2015-07-02
  • eswar

    eswar - 2015-04-13

    Hi-I am setting up the utplsql for the first time. I have installed all utplsql 2.3.0 objects in Schema A. And I have created below package in Schema B. I have granted execute permission on this package to Schema A.

    CREATE OR REPLACE PACKAGE "PKG_WEBSERVICES"
    AS
    function betwnstr (
    string_in IN VARCHAR2,
    start_in IN INTEGER,
    end_in IN INTEGER) return varchar2;

    END PKG_WEBSERVICES;

    CREATE OR REPLACE PACKAGE BODY "PKG_WEBSERVICES"
    AS

    function betwnstr (
    string_in IN VARCHAR2,
    start_in IN INTEGER,
    end_in IN INTEGER) return varchar2 is

    begin
    RETURN (SUBSTR (string_in, start_in, end_in - start_in + 1));
    end;

    END PKG_WEBSERVICES;

    Test package that I have created in Schema B is as follows. And grant execte is given to Schema A.

    CREATE OR REPLACE PACKAGE ut_pkg_webservices
    IS
    PROCEDURE ut_setup;
    PROCEDURE ut_teardown;

    PROCEDURE ut_betwnstr;
    END ut_pkg_webservices;

    CREATE OR REPLACE PACKAGE BODY ut_pkg_webservices
    IS
    PROCEDURE ut_setup IS
    BEGIN
    NULL;
    END;

    PROCEDURE ut_teardown
    IS
    BEGIN
    NULL;
    END;

    PROCEDURE ut_betwnstr IS
    BEGIN
    utAssert.eq (
    'Typical valid usage',
    pkg_webservices.betwnstr(
    STRING_IN => 'abcdefg',
    START_IN => 3,
    END_IN => 5
    ),
    'cde'
    );
    end;

    end ut_pkg_webservices;

    when I execute the below statment to run this test I am facing an issue. Output is below. Could you please let know if I am missing something here?

    SQL> exec utplsql.test ('pkg_webservices', recompile_in => FALSE)
    Initialized utPLSQL session...
    Setpkg to pkg_webservices
    Package and program = ut_pkg_webservices
    Same package? N
    Is package? Y
    Prefix = ut_
    Runprog of ut_SETUP
    Package and program = ut_pkg_webservices.ut_SETUP
    Same package? N
    Is package? Y
    Prefix = ut_
    Warning!
    Warning...no tests were identified for execution!
    Warning!
    .

    FFFFFFF AA III L U U RRRRR EEEEEEE
    F A A I L U U R R E
    F A A I L U U R R E
    F A A I L U U R R E
    FFFF A A I L U U RRRRRR EEEE
    F AAAAAAAA I L U U R R E
    F A A I L U U R R E
    F A A I L U U R R E
    F A A III LLLLLLL UUU R R EEEEEEE
    .
    FAILURE: ".pkg_webservices"
    .
    Individual Test Case Results:

    NONE FOUND

    Errors recorded in utPLSQL Error Log:

    NONE FOUND
    Runprog of ut_TEARDOWN
    Package and program = ut_pkg_webservices.ut_TEARDOWN
    Same package? N
    Is package? Y
    Prefix = ut_
    SQL>

     

    Last edit: eswar 2015-04-13
  • eswar

    eswar - 2015-04-13

    Also, when I check the table ut_package it reads as this has been executed 16 times. And the last status is 'Success'.

     
  • eswar

    eswar - 2015-04-14

    Ok, my mistake. I was executing this from utplsql schema and not the application schema. This is resolved for me now. thank you.

     
  • Paul Walker

    Paul Walker - 2015-04-14

    Glad you got it sorted :)

     
  • Indrajit Mohapatra

    Hi Paul,
    I have installed "oracle 11G express edition" and all "utplsql 2.3.0".
    UTL_FILE package has not created in SYSTEM schema in "oracle 11G express edition".
    I am trying to create spec and body for UTL_FILE package.
    I executed utlrp.sql in SYSTEM schema in oracle 11G express edition.
    But I am getting following error:-
    SQL> @C:\oraclexe\app\oracle\product\11.2.0\server\rdbms\admin\utlrp.sql;
    SELECT dbms_registry_sys.time_stamp('utlrp_bgn') as timestamp from dual
    *
    ERROR at line 1:
    ORA-00904: "DBMS_REGISTRY_SYS"."TIME_STAMP": invalid identifier

    Need your help for above issue.

     

    Last edit: Indrajit Mohapatra 2015-06-09
  • Paul Walker

    Paul Walker - 2015-07-02

    I don't know if this is your issue, but I've seen some webpages suggest that you need to log on as SYS and grant execute privilege on the UTL_FILE package. For example, have a look at: http://feuerthoughts.blogspot.co.uk/2006/03/some-gotchas-with-oracle-xe.html

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.