Esempio n. 1
0
 public ResultSummary(TestRunResult results)
 {
     _results = results;
     Initialize();
     Summarize(results.TestResults);
     StartTime = results.StartTime;
     EndTime   = results.EndTime;
 }
Esempio n. 2
0
        public async Task <ResultSummary> ProcessResults(TestRunResult results)
        {
            var summary = new ResultSummary(results);

            var _resultProcessor = TestResultProcessor.BuildChainOfResponsability(Options);
            await _resultProcessor.Process(summary).ConfigureAwait(false);

            return(summary);
        }
Esempio n. 3
0
        public async Task <TestRunResult> ExecuteTests(IEnumerable <ITest> tests = null, bool force = false)
        {
            var resultPackage = new TestRunResult();

            var filter   = new CustomTestFilter(tests, force);
            var listener = Options?.LogToOutput == true ? new CustomTestListener() : TestListener.NULL;
            var result   = await Task.Run(() => _runner.Run(listener, filter)).ConfigureAwait(false);

            LogTestRun(result);

            resultPackage.AddResult(result);
            resultPackage.CompleteTestRun();
            return(resultPackage);
        }
Esempio n. 4
0
        public async Task <TestRunResult> ExecuteTests()
        {
            var resultPackage = new TestRunResult();

            foreach (var assembly in _testAssemblies)
            {
                NUnitTestAssemblyRunner runner = await LoadTestAssemblyAsync(assembly).ConfigureAwait(false);

                ITestResult result = await Task.Run(() => runner.Run(TestListener.NULL, TestFilter.Empty)).ConfigureAwait(false);

                resultPackage.AddResult(result);
            }
            resultPackage.CompleteTestRun();
            return(resultPackage);
        }
Esempio n. 5
0
 public ResultSummary(TestRunResult results)
 {
     _results = results;
     Initialize();
     Summarize(results.TestResults);
 }