Toad World® Forums

Unit Testing a Function


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
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



I am confused: when you show this text:


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.



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


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:

That is, don’t send it to support.

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