private void InitializeSummaryItems(TestSummaryGroup testSummaryGroup, PipelineConfiguration config, bool includeOthersInTotal) { SummaryItems = new List <TestSummaryItemViewModel>(); foreach (var testSummaryItem in testSummaryGroup.Runs) { SummaryItems.Add(new TestSummaryItemViewModel(testSummaryGroup.GroupingType, testSummaryItem, config, includeOthersInTotal)); } }
public TestSummaryGroupViewModel(TestSummaryGroup testSummaryGroup, PipelineConfiguration config, bool includeOthersInTotal) { GroupName = testSummaryGroup.GroupingType.GetDescription(); InitializeSummaryItems(testSummaryGroup, config, includeOthersInTotal); InitializeSupportedPriorityColumns(); }
private async Task <TestSummaryGroup> GetTestRunSummaryWithPriority() { var testSummaryItemsByRuns = await _tcmApiHelper.GetTestRunSummaryWithPriorityAsync(); var testSummaryByRun = new TestSummaryGroup { GroupingType = TestResultsGroupingType.Run, Runs = testSummaryItemsByRuns }; return(testSummaryByRun); }
private static bool HasTestsWithOutcomes(TestSummaryGroup summaryGroup, params TestOutcome[] failureOutcomes) { if (summaryGroup == null) { return(false); } return(failureOutcomes.Any(failureOutcome => summaryGroup.Runs.Any(testSummaryItemDto => testSummaryItemDto.TestCountByOutCome.ContainsKey(failureOutcome) && testSummaryItemDto.TestCountByOutCome[failureOutcome] > 0))); }
private async Task <TestSummaryGroup> GetTestSummaryByPriorityAsync() { TestResultsDetails testSummaryItemsByRuns = await _tcmApiHelper.GetTestSummaryAsync(TestResultsConstants.Priority); var testResultDetailsParserForPriority = new TestResultDetailsParserForPriority(testSummaryItemsByRuns, _logger); var testSummaryByRun = new TestSummaryGroup { GroupingType = TestResultsGroupingType.Priority, Runs = testResultDetailsParserForPriority.GetSummaryItems() }; return(testSummaryByRun); }