Toad World® Forums

Customize outcomes - result description


#1

For some tests cases input parameters and some internal variables are generated dinamicaly. It would be usefull to see this information in “Result description” field, to find problem if test was unsuccessful. Any suggestions?

Donatas


#2

Donatas,

In 1.6 (beta is available on this community), when we generate test cases dynamically, we now always show the input values for that test case.

What sort of internal variables are you looking for?

Regards, SF


#3

Hi Steven,

Showing inputs will be very usefull, but not solve whole problem. I’ll shortly describe my test case, for better understanding what I mean.
I have procedure calc(p_start date, p_end date) which from some tables select, calculate and then update thousands of records. To check all calculated values is unrealistic so I dinamically pick up some specific values and test only them. My test algorithm:

  1. pick up some date from range and store it into internal variable tst_date.
  2. pick up some entity_id for which calculation shoul be done and store to tst_id
  3. calculate expected value for tst_date, tst_id and store to tst_value
  4. execute procedure calc, and then
  5. check do queried scalar for tst_date, tst_id matches expected value tst_value?

After execution I see something like: Test failed 654.321 <> -123.456 :(. Not very informative.
So question is could I do something like:
6) outcome_result_description := outcome_result_description || tst_date|| tst_id

Regards,
Donatas


#4

Thanks for clarifying!

That is a very wonderful idea: allow the user to override/add to the default result message.

I will add it to our ER list. I am thinking that the way to do this is to give you the ability to call a backend API program like:

qu_result_xp.change_result_message (
action_in => ‘APPEND|REPLACE’
, text_in => ‘YOUR STRING’
, is_expression_in => TRUE|FALSE);

where is_expression_in indicates whether or not we need to evaluate your string as a dynamic PL/SQL expression or as a static piece of text.

This program call would go in your customization logic for the outcome, or something like that.

What do you think of this?

Message was edited by: StevenFeuerstein


#5

Well, I hope you like this idea. Because I implemented in the backend this AM and it seems to be working. Which means that you can test it out in the 1.7 Beta 1 release that will be available within a month or so!

You can choose to append or replace the message.

BUT…if you want to reference variables in the test package, you must declare them in the package spec so I can resolve with dyn PLSQL.

I will put instructions in the help doc.

SF


#6

Thank you, this is great news!
Waiting for 1.7 impatiently.

Donatas