Toad World® Forums

Creating outcome for function returning SYS_RefCursor


#1

Here’s the scenario I was having an issue with:

  • Create a test case for a function that returns SYS_REFCURSOR

  • Add outcome using Grid for “Argument or RETURN Clause”

  • (get “Content of expected REF CURSOR” popup)

  • Enter query to determine columns of REF CURSOR, then click OK

  • Save

This causes a Warning (“Your test definition contains warnings…”). When I look at the query for the REF CURSOR (i.e. click “…” next to Function Return Value), the Query field is blank. If I enter the query a 2nd time it seems to stick.

Am I entering something wrong?

Thanks,
Mitch


#2

Mitch,

It’s a matter of bad UI design (and/or Help doc), basically. If you compare a CV to another CV, you have to tell us the structure of the result set, so that’s what that query is for.

If you want to compare a CV to a query (that is, the query is the Expected Result), then just go to that section of the outcome (via wizard or grid) and choose the expected type to Query, and then put your query in that field.

Code Tester will then use THAT query to both determine the structure of the CV (assumes compatibility) and the dataset against which the rows of the CV will be compared.

Does that help?

SF