So…in the initialization section for your test case you will write an insert statement, correct? Then you want to use a value from that row as the input value (I assume this means one of your IN arguments in your program).
OK…there are two ways to do this:
Put the select statement inside a function. This function could be placed in the Declare Programs custom section for the test case, or compiled independently. Then open up the Properties window for that input, check the Evaluate as an expression, and type in the call to that function in the window.
OK, you don’t want to write a function. Fine! Still, open up the Properties window for your input. Notice the name of the variable, such as l_string_in. Put the query in the test case initialization and populate this variable. Example:
select ‘abc’ into i_STRING_IN from dual;
Then save your test case. Final step: from within the Test Editor, drill down to that input and check the Set in Initialization code box. Code Tester will then use the value set by the query in the call to the program.
Yes, it should be easier – and it will be in the commercial release in Feb 2007!
Hope that helps, SF