IList <GroupedResult> ITestViewerService.GetResults(int testsystemIndex, int testsuiteId, DateTime?resultsSince) { Testsuite testsuite = _testsuiteRepository.GetById(testsuiteId); IList <Result> results = _resultRepository.GetListOfResults(testsystemIndex, testsuite.Browsers, testsuite.Testcases, testsuite.Languages).ToList(); List <GroupedResult> groupedResults = new List <GroupedResult>(); foreach (Testcase testcase in testsuite.Testcases) { GroupedResult groupedResult = CalculateGroupedResultsForTestcase(testcase.ID, results.Where(result => result.Testcase.ID == testcase.ID).ToList(), resultsSince); if (groupedResult != null) { groupedResults.Add(groupedResult); } } return(groupedResults); }
void ITestService.TestTestsuite(int testerId, int testsystemId, int testsuiteId) { Testsuite testsuite = _testsuiteRepository.GetById(testsuiteId); Testsystem testsystem = _testsystemRepository.GetById(testsystemId); Tester tester = _testerRepository.GetById(testerId); TestJob testJob = CreateTestJob("Testsuite " + testsuite.Name, testsuite, testsystem, tester); ITestJobManager testJobManager = new TestJobManager(testJob); ICollection <WorkItem> workItems = (from testcase in testsuite.Testcases from browser in testsuite.Browsers from language in testsuite.Languages select new WorkItem(testJobManager) { Testcase = testcase, Browser = browser, Language = language, Testsystem = testsystem, Tester = tester }).ToList(); _testPool.AddTestJob(testJobManager, workItems); }
TestsuiteDto ISettingsService.FindTestsuiteByID(int testsuiteId) { return(Mapper.Map <TestsuiteDto>(_testsuiteRepository.GetById(testsuiteId))); }