Toad World® Forums

Quick Builds for cusomisation code/input objects


#1

In a lot of the tests I’ve been creating recently, there’s a SQL Object Type passed as an input parameter, which has to be setup by pressing the “[…]” button and typing in the code required to instantiate the object.

I understand why Objects are not supported for automatic creation (as is a varchar2 or number for example), but it would be nice to be able to store and re-use the instantiation code between Unit Tests or even Test Cases, rather than having to copy and paste (or re-type) the code every time.

A similar quick-code drag&drop would be nice for customisation code as I find several (but not all) Unit Tests within a Test Case use the same/very similar customisation code.


#2

Chris,

Actually, you CAN store and reuse the initialization code, right now!

Open your test definition in the Test Editor. Then, at the highest level (Properties) or within the Unit you are testing, click on the customization tab and then create that initialization code as a procedure in the section titled:

Declarations of custom procedures and/or functions

Then call the subprogram wherever you need it.

I hope that helps…

Steven Feuerstein


#3

Ooh, OK, that sounds like a good diea, I’ll give that a go in my next set of test cases!

Thanks for the response.