Пример #1
0
 public static QCTestInstanceColl GetTestInstancesOfTestSet(string testSetID)
 {
     try
     {
         return(QcRestClient.GetTestInstancesOfTestSet(testSetID));
     }
     catch (Exception ex)
     {
         Reporter.ToLog(eAppReporterLogLevel.ERROR, "Failed to get test instances of test set with REST API", ex);
         return(null);
     }
 }
Пример #2
0
        public static dynamic GetTSRunStatus(dynamic TSItem)
        {
            QCTestInstanceColl testInstances = QcRestClient.GetTestInstancesOfTestSet(TSItem.TestSetID);

            foreach (QCTestInstance testInstance in testInstances)
            {
                bool existing = false;
                foreach (string[] status in TSItem.TestSetStatuses)
                {
                    if (status[0] == testInstance.Status)
                    {
                        existing  = true;
                        status[1] = (Int32.Parse(status[1]) + 1).ToString();
                    }
                }
                if (!existing)
                {
                    TSItem.TestSetStatuses.Add(new string[] { testInstance.Status, "1" });
                }
            }

            return(TSItem);
        }