Toad World® Forums

ASSERTION-FAILURE error


#1

Hello my problem is that when y try to build a test for a given package I get this error:
ASSERTION-FAILURE:
No argument information was found in ALL_ARGUMENTS for program “BUILDTRANSLATE”. This may happen when the program unit status is INVALID.

The Boolean expression provided evaluated to FALSE or NULL. The condition checked by the assertion program has failed.

And the caall stac is:
----- PL/SQL Call Stack -----
object line object
handle number name
0xbda87dc0 1479 package body TESTER.QU_RUNTIME
0xbda87dc0 1957 package body TESTER.QU_RUNTIME
0xbda87dc0 2892 package body TESTER.QU_RUNTIME
0xbda1a918 1353 package body TESTER.QU_UNIT_TEST_XP
0xbda1a918 1568 package body TESTER.QU_UNIT_TEST_XP
0xbda1a918 1775 package body TESTER.QU_UNIT_TEST_XP
0xc67a2c20 888 package body TESTER.QU_HARNESS_XP
0xc649d5c8 4 anonymous block

I think that the problem is caused when you use diferent type of parameters or returned values than normal scalar type.
In example:
This function fails:
FUNCTION BuildClauseToUpdate(sqltoupdate IN VARCHAR2, tablename IN VARCHAR2)
RETURN DYN_TYPE.queries – Custom type just a collection of varhar
IS
– variables
BEGIN

           -- do staff
        END LOOP;
       
    END IF;
    RETURN l_queries;
EXCEPTION
    WHEN OTHERS THEN
        DBMS_OUTPUT.PUT_LINE('Error:' || 'BuildToUpdate');
        RETURN l_queries;
END;

On this one don’t fails:
FUNCTION BuildClauseToUpdate(sqltoupdate IN VARCHAR2, tablename IN VARCHAR2)
RETURN varcahr2 – Just an scalar normal type
IS
– variables
BEGIN

           -- do staff
        END LOOP;
       
    END IF;
    RETURN l_queries;
EXCEPTION
    WHEN OTHERS THEN
        DBMS_OUTPUT.PUT_LINE('Error:' || 'BuildToUpdate');
        RETURN l_queries;
END;

This problem that i’m trying to explain fails 'cause the return type is a non scallar type. The same error happends when a paramenter isn’t a sclar type, in example a collection of varchar2.

What can I do to solve this problem and create unit test for functions with non scalar data type?

Thank’s in advance.

PD: Beside this error or some others, this software is awesome , great, and genial. Something like this need a good PL/SQL developer to be a better PL/SQL developer.


#2

Thanks for sending me your package spec and headers. Unhappily, I was not able to reproduce your problem. I was able to start up Test Builder for your function.

So please do the following for me:

  • Start up Code Tester and while in the Dashboard, start tracing. To do this, right click in the top left corner (icon) and choose Start Tracing. Leave the filter blank. Press OK.

  • Try to create a new test definition for your program.

  • When you get the error, create a support bundle, being sure to include the trace file and also the program you are working on.

  • Email the file to me (steven.feuerstein@quest.com).

Hopefully I can get a better sense for what is going on.

Also, please tell me which schema you installed the CT repository in, which schema you are connected to when you try to create the test definition, and who owns the package and code.

Thanks, SF


#3

After a follow-up from the customer, the issue became clear; he wrote:

“I have installed the Code Tester repository in the schema called TESTER. When building the test, I’m connected to the TESTER schema, and the owner of DYN_CURSOR_HELPER_TEST is MADDES.”

So this is what you need to remember:

If you log in to the Tester schema to do your testing (the schema owning the Code Tester repository),that schema will need execute authority on all the code you want to test. CodeTester cannot circumvent Oracle security. So once you log in to a schema, youcan also see, run and test programs on which you have execute authority.

Regards, Steven