Toad World® Forums

having trouble moving test from one schema to another


#1

I jumped into Quest Code Tester without reading the entire manual and now I would like to change my configuration. I want to convert my setup to resemble that described in “Single Shared Test Schema for all Developers” in the Help file. The problem is that I am unable to move existing tests from my personal schema to the “Test Schema” (using the nomenclature from the Help).

My personal schema has full Execute Authority on the Code Schema, as does the Test Schema. I’ve logged into Quest Code Tester as my personal schema and tried exporting the test. In the “Export Test Definitions” window, I’ve tried both “Set export owner to” options. Once I did the export, I reconnected as the Test Schema. I clicked on “Import…”, selected my file and clicked “OK”. Quest Code Tester thought for a little while and then returned to the Dashboard. However, the imported list was not there. I made sure the Code Schema was selected in the toolbar and I clicked the “Refresh” button. No matter what, nothing would show up in the Dashboard.

Using Toad’s Schema Browser, I looked around the Quest Code Tester Schema and the Test Schema. The Q## package had not been created in the Test Schema. However, there were some entries for the imported test in QU_HARNESS, QU_UNIT_TEST and QU_TEST_CASE tables in the Quest Code Tester Schema. I noticed that in the QU_HARNESS table, my personal schema was listed as the “HARNESS_OWNER”. I’m pretty sure that I want the Test Schema to own the harness, but I don’t want to update these tables behind the scenes.

As I said earlier, I tried both “Set export owner to” options in the “Export Test Definitions” window. When I leave it at the default, which is “Schema into which the test definition will be imported”, the import fails because the program being tested does not exist in the Target Schema. When I use the “Schema(s) currently specified in test definition” option, Quest Code Tester thinks for a while and then returns with nothing changing in the Dashboard.

I have a number of tests created in my personal schema and I really don’t want to recreate them by hand in the Test Schema. Any help on moving test cases from one schema to another would be greatly appreciated.

Thanks,
Brian


#2

I am traveling at the moment (in Singapore), so I cannot answer this immediately, but I will do so within the next day.

Steven Feuerstein


#3

Brian,

We can definitely fix the problem, but it does expose a bug which we have addressed in 1.9 (posted the first beta last week). That doesn’t help you now, just wanted to cheer you up. :slight_smile:

So…you WILL need to modify the table contents directly. And your analysis is spot on. You need to set the harness_owner value to the test schema.

You can do this manually via the Toad grids or an update statement like:

BEGIN
UPDATE qu_harness
SET harness_owner = ‘TEST_SCHEMA’
/* your real schema name, of course */
;
COMMIT;
END;

The above statement assumes that all of the test definitions in this repository have the same issue/requirement.

Please do this and let me know if life improves. Do NOT start recreating tests by hand.

Sorry about the delay in responding. I had to pay a visit to Singapore.

Regards, Steven


#4

Thank you for providing the SQL to fix this problem. I still have a little cleanup to do since my QU_HARNESS table has 10 rows and the Dashboard only shows 4 tests, but I’m well on my way now.

Thanks,
Brian