Relatively new to QTP and have a seemingly stupid problem--saving a test with VBA. (269 Views)
Reply
Occasional Visitor
MikeSavino
Posts: 1
Registered: ‎04-04-2014
Message 1 of 1 (269 Views)

Relatively new to QTP and have a seemingly stupid problem--saving a test with VBA.

[ Edited ]

I want to associate a shared object repository with a test. So far, I'm using

 

Dim qtpApp

 

set qtpApp = createObject ("QuickTest.Application")

 

qtApp.Test.Actions("Action1").ObjectRepositories.Add  "path to shared object repository", 1

 

qtApp.Test.save

 

set qtApp = Nothing

 

So, I've read the documentation on this. It should be working. But I'm getting "Failed to save the test or business component." And when I go to debug mode after trying to run the test, I see that the object repository has been associated with the test and the object repository contains what I expect it to. 

 

The odd thing is, if I comment out the objectRepositories.Add line, the thing runs fine. It seems that if there hasn't been any changes, the qtApp.Test.save does not throw an error. 

 

So. My question is twofold, really. 

 

First: Anyone have any knowledge of this problem?

 

Second: Is there any way to get better error messaging than the vague "Failed to save the test or business component."? 

Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation