Created
November 20, 2012 21:34
-
-
Save fijiaaron/4121324 to your computer and use it in GitHub Desktop.
Run a TestSet in QualityCenter using the OTA API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using TDAPIOLELib; | |
namespace oneshore.qcintegration.examples | |
{ | |
class RunTestSet | |
{ | |
public static void Main() | |
{ | |
String qcUrl = "http://localhost:8080/qcbin"; | |
String qcDomain = "oneshore"; | |
String qcProject = "QCIntegration"; | |
String qcLoginName = "aaron"; | |
String qcPassword = "secret"; | |
String testSetPath = @"ROOT\path\to\testset"; | |
String testSetName = "TestSet name"; | |
TDConnection connection = new TDConnection(); | |
connection.InitConnectionEx(qcUrl); | |
connection.ConnectProjectEx(qcDomain, qcProject, qcLoginName, qcPassword); | |
TestSetFactory testSetFactory = connection.TestSetFactory; | |
TestSetTreeManager testSetTreeManager = connection.TestSetTreeManager; | |
TestSetFolder testSetFolder = (TestSetFolder) testSetTreeManager.NodeByPath[testSetPath]; | |
List testSetList = testSetFolder.FindTestSets(testSetName); | |
TestSet testSet = testSetList[0]; | |
TSScheduler scheduler = testSet.StartExecution(""); | |
scheduler.RunAllLocally = true; | |
scheduler.Run(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment