/// <summary> /// Executes query on ALM Database /// </summary> /// <param name="QueryToExecute">Query to execute</param> /// <param name="tDConnection">TDAPIOLELib.TDConnection Object with active ALM Connection</param> /// <returns>TDAPIOLELib.Recordset Object</returns> public static TDAPIOLELib.Recordset ExecuteQuery(String QueryToExecute, TDAPIOLELib.TDConnection tDConnection) { try { if (!(QueryToExecute.Trim().ToUpper().StartsWith("SELECT"))) { throw (new Exception("Only Select Query can be executed using this funtion")); } TDAPIOLELib.Command OCommand = (TDAPIOLELib.Command)tDConnection.Command; OCommand.CommandText = QueryToExecute; return((TDAPIOLELib.Recordset)OCommand.Execute()); } catch (Exception ex) { throw (new Exception(ex.Message.ToString())); } }
public TestFolders(TDAPIOLELib.TDConnection tDConnection) { this.tDConnection = tDConnection; this.test = new Test(tDConnection); }
public Cycle(TDAPIOLELib.TDConnection tDConnection) { this.tDConnection = tDConnection; }
public override string UpdateTestResult(TestResult result, bool publishFailures, bool publishInconclusive, bool publishErrorInformation) { string resultString = "You should never see this."; if (result == null) { return "No test result was passed to publish."; } if ( result.Description.ToString() == null) { return "The test " + result.Description + " does not have a description defined in code."; } bool publishResult = false; switch (result.Outcome) { case TestResult.TestResultType.Aborted: resultString = "The test " + result.Description + " has aborted will not be published."; publishResult = false; break; case TestResult.TestResultType.Passed: publishResult = true; break; case TestResult.TestResultType.Failed: if (publishFailures) { publishResult = true; } else { resultString = "The test " + result.Description + " has failed will not be published."; publishResult = false; } break; case TestResult.TestResultType.Inconclusive: if (publishInconclusive) { publishResult = true; } else { resultString = "The test " + result.Description + " was inconclusive will not be published."; publishResult = false; } break; case TestResult.TestResultType.NotExecuted: publishResult = false; break; } bool publishedSuccessfully = false; if (publishResult) { try { #if HPQC connection = new TDAPIOLELib.TDConnection(); connection.InitConnectionEx(CurrentProject.ServerURL); connection.ConnectProjectEx(CurrentProject.DomainName, CurrentProject.ProjectName, CurrentProject.Username, CurrentProject.Password); #endif } catch (Exception e) { return "Unable to connect to the Mercury server: " + CurrentProject.DomainName + " on project " + CurrentProject.ProjectName + ". The error was: " + e.Message; } publishedSuccessfully = UpdateTestExecution(result); } else { return resultString; } if (publishedSuccessfully) { return "'" + result.Description + "' was published successfully."; } else { return "'" + result.Description + "' did not publish because it was not found."; } }
//Constructor public Analysis(TDAPIOLELib.TDConnection tDConnection) { this.tDConnection = tDConnection; }
public Requirements(TDAPIOLELib.TDConnection tDConnection) { this.tDConnection = tDConnection; }
//Constructor public Defect(TDAPIOLELib.TDConnection tDConnection) { this.tDConnection = tDConnection; }
public Releases(TDAPIOLELib.TDConnection tDConnection) { Release = new Release(tDConnection); ReleaseFolders = new ReleaseFolders(tDConnection); Cycle = new Cycle(tDConnection); }
public Release(TDAPIOLELib.TDConnection tDConnection) { this.tDConnection = tDConnection; releaseFolders = new ReleaseFolders(tDConnection); }
//Set the connection to tests here public TestLab(TDAPIOLELib.TDConnection tDConnection) { TestSet = new TestSet(tDConnection); TestLabFolders = new TestLabFolders(tDConnection); }
public ReleaseFolders(TDAPIOLELib.TDConnection tDConnection) { this.tDConnection = tDConnection; }
//Set the connection to tests here public TestPlan(TDAPIOLELib.TDConnection OALMConnection) { Test = new Test(OALMConnection); TestFolders = new TestFolders(OALMConnection); }
//Constructor public Dashboard(TDAPIOLELib.TDConnection tDConnection) { this.tDConnection = tDConnection; }
/// <summary> /// Creates Helper Test Class Object /// </summary> /// <param name="OALMConnection">Pass TDConnection object to create the Test Object.</param> public Test(TDAPIOLELib.TDConnection OALMConnection) { this.tDConnection = OALMConnection; }
public TestSet(TDAPIOLELib.TDConnection tDConnection) { this.tDConnection = tDConnection; testLabFolders = new TestLabFolders(tDConnection); }
public TestLabFolders(TDAPIOLELib.TDConnection tDConnection) { this.tDConnection = tDConnection; }