Ejemplo n.º 1
0
        public int RunTests(TestFilter filter, IDictionary runSettings)
        {
            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 && !PORTABLE
            if (_options.ResultOutputSpecifications.Count > 0)
            {
                var outputManager = new OutputManager(_options.WorkDirectory);

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

            return(Summary.FailureCount + Summary.ErrorCount + Summary.InvalidCount);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Called when a test has finished
        /// </summary>
        /// <param name="result">The result of the test</param>
        public void TestFinished(ITestResult result)
        {
            if (_teamCity != null)
            {
                _teamCity.TestFinished(result);
            }

            _textUI.TestFinished(result);
        }