2016-11-15 34 views

回答

0

你可以編寫一個程序來使用開放測試API(OTA)。下面的代碼基於C++使用OTA的#import包裝器。

給定一個ITest2Ptr你能確定它是否是一個QTP腳本:

IExtendedStoragePtr storage = test->ExtendedStorage; 
BSTR raw_root_path; 
HRESULT hr = storage->raw_Load(L"", VARIANT_TRUE, &raw_root_path); 

的「raw_root_path」文件夾包含所有QTP相關:

if (test->Type == "QUICKTEST_TEST") 
{ 
/* ... */ 
} 

可以使用保存測試腳本材料。