Toad World® Forums

Unit Testing a Function


#1

Front End Version 1.6.x.x
Back End Version 1.6.x.x
The function does the following: Input = 1234, Outputs = 01234
Here is the test case I defined:
Input = 1234

Changed By Program
Argument or Return Value
..COMPANY_NUMBER%TYPE
Expected Result
Same as Function Return Value
Variable Name = e_Function_return_value
Data Type used to declare variable = ..COMPANY_NUMBER%TYPE
Single Value = 01234

I get the following error message - Test Code does not compile. Here is the error message and code:

Error message: PLS-00201: identifier ‘.COMPANY_NUMBER’ must be declared
Code: PROCEDURE q##companyid_is_5_digit_long /* Test case name: CompanyId is 5 Digit long */ IS – Return value of function


#2

Rravin,

I am confused: when you show this text:

..COMPANY_NUMBER%TYPE

is this something that you have typed in or copied from somewhere? You should be supplying the ACTUAL schema name and table name, so we can compile this code!

But again, perhaps I am not understanding clearly what you wrote. Please clarify.

SF


#3

Hey Steve, I do have the Schema Name and Table Name in my code. It still does not compile.


#4

Please open up this test definition in the Test Editor, create a support bundle (do this off the Help menu), press the Use non-default address box on the bottom and make sure the Address says only:

steven.feuerstein@quest.com

That is, don’t send it to support.

Then send it to me and I will take a look.


#5

Done