Toad World® Forums

Copy test case from one package to another


I have about 40 test cases built, but because of a standards change, I need to rename the package. I now have the old package that has the test cases, and the new package (the old one renamed) with no test cases. Is there a way I can get the test cases associated with the new (renamed) package? I tried export, change all of the old package name to the new one in the XML file, then import, but that didn’t work. Any help would be greatly appreciated.


All you have to do is open Test Editor for the existing test
definition and change the name of the program unit that you are testing.

That should be all that is necessary.



I just did that, and now I can not see test cases under either package, although they still exist in the qu_test_case table. Any idea what’s going on?



Is this new package owned by the same owner as the old one?




That’s too bad…I just did the steps I recommended to you:

  1. Create test definition for package X.
  2. Then change name of program in test definition to X2.
  3. Run new test - and all seemed fine.

I worry that in one of the steps you previously took something has gotten twisted up somehow.

So, now we shift to Quest Support: send me an email ( with a support bundle that includes the package giving you trouble or log a bug with Quest Support and provide the same support bundle.

Hopefully once I see your test definition I can sort it out quickly.

Regards, SF


Hi Steve,

Well, I got it to work. However, I think there is a problem with the Test Editor. Here’s what I did.

In out site, CT runs in its own schema, and other schemas grant access packages and tables to the CT account.

I removed all objects from the CT schema, and reinstalled them.
I imported the test cases into as per the original package. They came in just fine.
I then use the Test Editor and changed the package name. As previously, all of the test cases then disappeared from the CT dashboard.
Then I added a dummy test case to the new package.
I then viewed the QU_HARNESS table. The PROGRAM_NAME for the new package had the schema prefix in front of it (which came from the import or from the Test Editor?), the PROGRAM_NAME for the dummy test case did not have the schema prefix.
I deleted the dummy test case.
I updated (back door) the QU_HARNESS table so that the PROGRAM_NAME did not have the schema, and presto, it worked.



I am glad you got it to work, though sorry about all that effort.

So the column containing the program name actually looked like:


? That is very curious. Could you send me the export file?

Thanks, SF


Just emailed it to you.