Ejemplo n.º 1
0
        private void RunTests(ITestFilter filter)
        {
            var startTime = DateTime.UtcNow;

            ITestResult result = _runner.Run(this, filter);

            new ResultReporter(result, _outWriter).ReportResults();

            if (_options.ResultOutputSpecifications.Count > 0)
            {
                var outputManager = new OutputManager(_workDirectory);

                foreach (var spec in _options.ResultOutputSpecifications)
                {
                    outputManager.WriteResultFile(result, spec);
                }
            }
        }
Ejemplo n.º 2
0
        private void ExploreTests()
        {
            ITest testNode = _runner.LoadedTest;

            var specs = _options.ExploreOutputSpecifications;

            if (specs.Count == 0)
            {
                new TestCaseOutputWriter().WriteTestFile(testNode, Console.Out);
            }
            else
            {
                var outputManager = new OutputManager(_workDirectory);

                foreach (var spec in _options.ExploreOutputSpecifications)
                {
                    outputManager.WriteTestFile(testNode, spec);
                }
            }
        }
Ejemplo n.º 3
0
        private int RunTests(ITestFilter filter)
        {
            var startTime = DateTime.UtcNow;

            ITestResult result   = _runner.Run(this, filter);
            var         reporter = new ResultReporter(result, _outWriter, _options.StopOnError);

            reporter.ReportResults();

            if (_options.ResultOutputSpecifications.Count > 0)
            {
                var outputManager = new OutputManager(_workDirectory);

                foreach (var spec in _options.ResultOutputSpecifications)
                {
                    outputManager.WriteResultFile(result, spec);
                }
            }

            var summary = reporter.Summary;

            return(summary.FailureCount + summary.ErrorCount + summary.InvalidCount);
        }
Ejemplo n.º 4
0
        private int ExploreTests()
        {
            ITest testNode = _runner.LoadedTest;

            var specs = _options.ExploreOutputSpecifications;

            if (specs.Count == 0)
                new TestCaseOutputWriter().WriteTestFile(testNode, Console.Out);
            else
            {
                var outputManager = new OutputManager(_options.WorkDirectory);

                foreach (var spec in _options.ExploreOutputSpecifications)
                    outputManager.WriteTestFile(testNode, spec);
            }

            return OK;
        }
Ejemplo n.º 5
0
        private int RunTests(ITestFilter filter)
        {
            var startTime = DateTime.UtcNow;

            ITestResult result = _runner.Run(this, filter);

#if SILVERLIGHT
            // Silverlight can't display results while the test is running
            // so we do it afterwards.
            foreach(ITestResult testResult in _results)
                _textUI.TestFinished(testResult);
#endif
            ReportResults(result);

#if !SILVERLIGHT
            if (_options.ResultOutputSpecifications.Count > 0)
            {
                var outputManager = new OutputManager(_options.WorkDirectory);

                foreach (var spec in _options.ResultOutputSpecifications)
                    outputManager.WriteResultFile(result, spec);
            }
#endif

            return Summary.FailureCount + Summary.ErrorCount + Summary.InvalidCount;
        }
Ejemplo n.º 6
0
        private void RunTests(ITestFilter filter)
        {
            var startTime = DateTime.UtcNow;

            ITestResult result = _runner.Run(this, filter);
            new ResultReporter(result, _outWriter).ReportResults();

            if (_options.ResultOutputSpecifications.Count > 0)
            {
                var outputManager = new OutputManager(_workDirectory);

                foreach (var spec in _options.ResultOutputSpecifications)
                    outputManager.WriteResultFile(result, spec);
            }
        }