TA的每日心情 | 开心 2016-2-27 08:48 |
---|
签到天数: 2 天 连续签到: 1 天 [LV.1]测试小兵
|
Product:
QTP 6.5
QTP 8.0
QTP 8.2
QTP 8.01
Ext(s):
Add-in Not Applicable
Topics:
Actions and External Libraries Problems or Questions
TestDirector Integration
Integration with Other Mercury Interactive Products
OS:
Any Windows Platform
Creation Date:
30 Mar 2005 Last Modified Date:
31 Mar 2005
Problem Description: How to run a file stored in Quality Center from QuickTest Professional
Quality Center has the capability to attach files to a folder or to a file in the Test Plan module. These files can be of any type (batch file, VBScript, Microsoft Word, Microsoft Excel, etc.). If the attachment file is an executable file (such as a batch file, an .exe, or .VBS file) can the user run this file from QuickTest Professional?
Note:
In this explanation, Quality Center and TestDirector can be interchanged.
Solution: Download the batch file from Quality Center to a local drive and run it locally
1. Download the file from Quality Center to your local file system.
If your attachment is located in a test stored in the Quality Center Test Plan, please refer to Problem ID 36734 - How to programmatically download an attachment from Quality Center to a local drive. You should use the GetAttachmentFromTest function to download and store the attachment in a local folder.
Example:
FilePath = GetAttachmentFromTest("Attachment", "RunMe.bat", "C:\aa\")
If your attachment is located in a folder stored in the Quality Center Test Plan, please refer to Problem ID 39166 - How to download an attachment from a folder in Quality Center to a local drive. You should use the GetAttachmentFromFolder function to download and store the attachment in a local folder.
Example:
FilePath = GetAttachmentFromFolder ("Subject\MyAttachmentsFolder ", " RunMe.bat ", "C:\aa\")
2. Use SystemUtil.Run to run the file.
Example:
SystemUtil.Run FilePath |
|