Toad World® Forums

Re-generating test code


#1

Hello,
I recently updated an existing test using the steps outlinedin “Update Test Definition After Program Changes”. I needed to add a parameter to a program and therefore the test code needs to be regenerated. However when I click “Generate Test Code”, I get the following error and the test codes remains the same:

“The test definition for already generates a package named . Change the test package name via the Test Editor to avoid overwriting test code.”

Why can it not regenerate the existing test package with the updated code for the test case (add parameter)? Am I doing something wrong?

Drew


#2

Hmmm. You should not be seeing this message if you only added a new test element.

Can you please describe the steps you took?

Did you change the name of the test package in the test editor?

And if you do change the name (from Q##<program_name>) to something else, are you then able to generate the test code?

Thanks, SF


#3

My steps were as follows:

  1. Open test in the test editor
  2. Navigate to unit test
  3. Add new test element for new argument (out parameter)
  4. Opened test builder and added new outcome using new out parameter
  5. Click generate test code from test editor

If I do change the test package name in the test editor and try to generate, I get another error:

Error Code: 10000001
Error Name: ASSERTION-FAILURE
Error Details: No columns for with status

The Boolean expression provided evaluated to FALSE or NULL. The condition checked by the assertion program has failed.

Call Stack:
----- PL/SQL Call Stack -----
object line object
handle number name
0x799ebc30 1685 package body UNIT_TEST.QU_RUNTIME
0x799ebc30 2163 package body UNIT_TEST.QU_RUNTIME
0x799ebc30 3077 package body UNIT_TEST.QU_RUNTIME
0x79671638 6787 package body UNIT_TEST.QU_HARNESS_XP
0x79671638 6938 package body UNIT_TEST.QU_HARNESS_XP
0x9487cd58 6529 package body UNIT_TEST.QU_GENERATE
0x9487cd58 9797 package body UNIT_TEST.QU_GENERATE
0x9487cd58 10072 package body UNIT_TEST.QU_GENERATE
0x9487cd58 10130 package body UNIT_TEST.QU_GENERATE
0x94a9a7a0 4 anonymous block

Environment:
declare
TERMINATE_WITH_SLASH_IN boolean := sys.diutil.int_to_bool(:TERMINATE_WITH_SLASH_IN);
begin
QU_GENERATE.GENERATE_TEST_CODE
(
HARNESS_ID_IN => :HARNESS_ID_IN
,
SPEC_STATUS_OUT => :SPEC_STATUS_OUT
,
BODY_STATUS_OUT => :BODY_STATUS_OUT
,
SPEC_CLOB_OUT => :SPEC_CLOB_OUT
,
BODY_CLOB_OUT => :BODY_CLOB_OUT
,
TERMINATE_WITH_SLASH_IN => TERMINATE_WITH_SLASH_IN
,
TEST_ENGINE_TYPE_IN => :TEST_ENGINE_TYPE_IN
,
AUTHID_PREFERENCE_IN => :AUTHID_PREFERENCE_IN
);
end;

Thanks for the help.

Drew