How do we use QC as Shared repository… ?
There was comment posted in this blog asking if we could use QC as a shared repository to store file and update it directly, without downloading to local desktop. I’m afraid that it is not possible to do without downloading the file to local desktop. But We certainly can use QC as a shared repository to store files and have it accessible to many tests. There are cases when multiple QTP tests may have a need to access the same file which is stored in the test’s project repository in QC. When we attach the file to a test, other tests will have to access this attachment through this test. Alternatively, a copy of the same file could be attached to each and every test. That would be a maintenance nightmare. So what would be the solution ? Read on…
We could use the ExtendedStorage object in OTA API to transport files that are not attachments.
This ExtendedStorage Object allows us to transport files between QTP client and the QC server without having to attach files to specific Quality Center (QC) entities (such as a test).
The following code will upload a file called Trial.mdb from the QTP client to the project repository in QC
Set currentTest = QCUtil.CurrentTest
Set attachmentFact = currentTest.Attachments
Set extendedStorage = attachmentFact.AttachmentStorage
extendedStorage.serverpath = extendedStorage.serverpath
extendedStorage.clientpath = “C:\”
extendedStorage.save “Trial.mdb”, true
The following code can be used to download a file from the project repository to C:\ of the QTP Client:
Set currentTest = QCUtil.CurrentTest
Set attachmentFact = currentTest.Attachments
Set extendedStorage = attachmentFact.AttachmentStorage
extendedStorage.serverpath = extendedStorage.serverpath
extendedStorage.clientpath = “C:\”
extendedStorage.load “trial.mdb”, true
Notes:
August 3, 2008 - Posted by haripotter | HP Quality Center and QTP | attachment, extended storage, QC, qtp | No Comments Yet
No comments yet.
Leave a comment
About
I’m Hari from Bangalore, India. I’am a test architect involved in creating test automation frameworks for testing enterprise web applications that manage IT infrastructure. I’m more interested in virtualization technologies, automation tools such as QTP, Silktest, Quality Center etc and HP BladeSystem. On the personal front, I’m married and have a beautiful daughter named Sandra. She is a year and half old. My hobbies are sketching and listening to music. My native place is kerala, God’s own country.
I use this blog as a medium to share some of the knowledge I gain from the automation community. Lot of folks out there, especially “advancedqtp.com” are very helpful and They have inspired me.
-
Blog Stats
- 27,948 hits
-
Recent Posts
-
Top Posts
Archives
-
Top Clicks
-
Archives
- June 2009 (1)
- April 2009 (1)
- March 2009 (1)
- August 2008 (5)
- July 2008 (4)
- May 2008 (2)
- April 2008 (3)
- February 2008 (3)
-
Categories
-
RSS
Entries RSS
Comments RSS