Exemple #1
0
        private int ExploreTests(ITestFilter filter)
        {
            ITest testNode = _runner.ExploreTests(filter);

            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);
        }
Exemple #2
0
        public int RunTests(TestFilter filter, IDictionary <string, object> 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)
            {
                        #if TIZEN
                // [DuongNT]: Create Tizen OutputManager
                var outputManager = new TOutputManager(_options.WorkDirectory);
                        #else
                var outputManager = new OutputManager(_options.WorkDirectory);
                        #endif
                foreach (var spec in _options.ResultOutputSpecifications)
                {
                    outputManager.WriteResultFile(result, spec, runSettings, filter);
                }
            }
                        #endif
            if (Summary.InvalidTestFixtures > 0)
            {
                return(INVALID_TEST_FIXTURE);
            }

            return(Summary.FailureCount + Summary.ErrorCount + Summary.InvalidCount);
        }
Exemple #3
0
        public int RunTests(TestFilter filter, IDictionary <string, object> runSettings)
        {
            var startTime = DateTime.UtcNow;

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

            ReportResults(result);

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

                foreach (var spec in _options.ResultOutputSpecifications)
                {
                    outputManager.WriteResultFile(result, spec, runSettings, filter);
                }
            }
            if (Summary.InvalidTestFixtures > 0)
            {
                return(INVALID_TEST_FIXTURE);
            }

            return(Summary.FailureCount + Summary.ErrorCount + Summary.InvalidCount);
        }
Exemple #4
0
        private int ExploreTests()
        {
#if !PORTABLE && !SILVERLIGHT
            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);
                }
            }
#endif

            return(OK);
        }
Exemple #5
0
        private int ExploreTests()
        {
#if !PORTABLE && !SILVERLIGHT
            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);
            }
#endif

            return OK;
        }
Exemple #6
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;
        }
Exemple #7
0
        public int RunTests(TestFilter filter, IDictionary<string, object> runSettings)
        {
            var startTime = DateTime.UtcNow;

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

#if !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
            if (Summary.InvalidTestFixtures > 0)
                return INVALID_TEST_FIXTURE;

            return Summary.FailureCount + Summary.ErrorCount + Summary.InvalidCount;
        }