private void CalculateTCExecutionDetails(ALMTSTest tc, QCManagerReportTestCaseDetails testCaseDetails) { List <ALMTSTestRun> filteredRuns = FilterRuns(tc.Runs); if (filteredRuns != null && filteredRuns.Count > 0) { testCaseDetails.NumberOfExecutions = filteredRuns.Where(x => x.RunName.ToUpper().Contains("GINGER") == true).Count(); testCaseDetails.NumberOfPassedExecutions = filteredRuns.Where(x => x.RunName.ToUpper().Contains("GINGER") == true && x.Status == "Passed").Count(); if (testCaseDetails.NumberOfExecutions > 0) { mExecutedNumber++; mRunsNumber += testCaseDetails.NumberOfExecutions; mPassedRunsPrecentage += mRunsNumber * ((double)testCaseDetails.NumberOfPassedExecutions / (double)testCaseDetails.NumberOfExecutions); } try { DateTime date = DateTime.Parse((filteredRuns[0].ExecutionDate)); testCaseDetails.LastExecutionTime = date.ToString("MM/dd/yyyy") + " " + filteredRuns[0].ExecutionTime; } catch (Exception ex) { testCaseDetails.LastExecutionTime = (filteredRuns[0].ExecutionDate); Reporter.ToLog(eLogLevel.ERROR, $"Method - {MethodBase.GetCurrentMethod().Name}, Error - {ex.Message}", ex); } testCaseDetails.LastExecutionStatus = filteredRuns[0].Status; } else { testCaseDetails.NumberOfExecutions = 0; testCaseDetails.NumberOfPassedExecutions = 0; testCaseDetails.LastExecutionTime = "NA"; testCaseDetails.LastExecutionStatus = "NA"; } }
/// <summary> /// Get Test Case from Activities Group ExternalId. /// </summary> /// <param name="key">Activities Group ExternalId</param> /// <returns>Mapped Test Case</returns> public ALMTSTest GetReMapAGSDic(string key) { ALMTSTest result = null; if (IsReMapAGSDicContainsKey(key)) { result = reMapActivitiesGroupsDic[key]; } return(result); }
/// <summary> /// Set Mapped Activities Groups dictionary, /// </summary> /// <param name="key">AG ExternalID</param> /// <param name="value">Mapped Test Case with ExternalID equal TC id</param> public void SetReMapAGSDic(string key, ALMTSTest value) { if (IsReMapAGSDicContainsKey(key)) { reMapActivitiesGroupsDic[key] = value; } else { reMapActivitiesGroupsDic.Add(key, value); } }
private void ReplaceMappedTestCaseHandler(ALMTestCaseManualMappingConfig source, ALMTestCaseManualMappingConfig target) { mWizard.ClearStepsLists(source); mWizard.ClearStepsLists(target); ALMTSTest targetTemp = target.aLMTSTest; // Map test case to Map row. target.UpdateMappedTestCase(source.aLMTSTest); // Replace target with source. source.UpdateMappedTestCase(targetTemp); }
private void MapTestCaseHandler(ALMTSTest source, ALMTestCaseManualMappingConfig target) { if (source is null) { return; } // if target already mapped, Add to unmapped list. if (target.aLMTSTest is not null) { mWizard.ClearStepsLists(target); mWizard.testCasesUnMappedList.Add(target.aLMTSTest); } // Map test case. target.UpdateMappedTestCase(source); // Remove test case from unmapped list. mWizard.testCasesUnMappedList.Remove(source); }
public void Clear() { this.aLMTSTest = null; }
public void UpdateMappedTestCase(ALMTSTest testCase) { aLMTSTest = testCase; OnPropertyChanged(nameof(TestCaseName)); }