N_GR Regular Contributor.
Regular Contributor.

Extract UFT tests scripts from ALM


I am trying to extract the UFT (v12.02) scripts from ALM (v12.00) and I could use the community's help.

I have found the following piece of C# code that does the trick. The only thing is that in some of the folders created apart from the scripts (Action0 and Action1 plus some config files) I see some subfolders named with names like 0_3018 as in the screenshot that contain a Report folder. Are these test run reports? If it is the case is there a way to exclude them from downloading?

I am attaching the piece of code that does the trick (Common.sSourcePath is the folder path in ALM Test Plan that contains the tests I want to download)

IExtendedStorage testStorage;
TestFactory testFactory = ConnectionConfig.Instance.qctd.TestFactory;
TDFilter filter = (TDFilter)testFactory.Filter;
List tests = testFactory.NewList(filter.Text);

foreach (Test tst in tests)
if (tst["TS_SUBJECT"].Path.ToString().StartsWith(Common.sSourcePath))
string testStr = tst["TS_SUBJECT"].Path.ToString();
path = Path.Combine(Common.sStoragePath, "UFT_TESTS", testStr.Replace(@"Subject\", string.Empty), tst.Name);

testStorage = tst.ExtendedStorage;
testStorage.ClientPath = path;
List nullList;
bool isFatalErr;

string testDownLoadPath = testStorage.LoadEx("", true, out nullList, out isFatalErr);


many thanks


The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.