I am attempting to invoke a test suite in ALM programmatically. I have no issue running the specified test suite on my local machine when I execute the code (when my machine acts as a test runner). I run into an issue however when I attempt to point to a remote server to run said test suite. Code and error message posted here:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TDAPIOLELib;
// Connect to ALM
ITDConnection itdc = new TDConnection();
itdc.InitConnectionEx(url);
itdc.ConnectProjectEx(domain, projectName, username, pswd);
if (itdc.ProjectConnected)
{
List<string> testInfo = new List<string>();
string testFolder = "Root\\<Folder>\\<Folder>";
testSetName = "<TestSuite>";
TestSetFactory tsFactory = (TestSetFactory)itdc.TestSetFactory;
TestSetTreeManager tsTreeMgr = (TestSetTreeManager)itdc.TestSetTreeManager;
TestSetFolder tsFolder = (TestSetFolder)tsTreeMgr.get_NodeByPath(testFolder);
List tList = tsFolder.FindTestSets(testSetName, false, null);
TestSet testset = tList[1];
TSScheduler scheduler = testset.StartExecution("<RemoteServerName>"); // Contain server name unless local
// scheduler.RunAllLocally = true; // Included when ran local
scheduler.Run();
}
The error message I recieve at the 'scheduler' declaration line is "Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))".
I have registered the OTAClient.dll on both my local machine and the machine that I have attempted to execute on.
Any suggestions would be appreciated.
- Next steps
- Call a young and old priest.