예제 #1
0
        /// <summary>
        /// Runs tests _as_ in conformance mode
        /// </summary>
        public void RunAll()
        {
            _td.ResetFeatures();
            Clear(true);
            if (View.TestTreeView != null)
            {
                View.TestTreeView.SelectTests(new TestInfo[0]);
            }

            TestSuiteParameters parameters = GetParameters();

            parameters.TestCases      = View.TestTreeView.SelectedTests;
            parameters.DefineProfiles = true;
            RunDiagnostic(parameters, false);
        }
예제 #2
0
        public void RunTests(Task task)
        {
            _view.BeginTesting();
            TestSuiteParameters parameters = GetTestSuiteParameters(task);

            _currentTask = new List <TestCaseSettings>();

            if (task.FeatureDefnitionSettings != null)
            {
                _td.ResetFeatures();
                _currentTask.Add(task.FeatureDefnitionSettings);
            }

            bool testsExist = false;

            foreach (TestCaseSettings tc in task.Tests)
            {
                TestInfo ti = _testInfos.Where(TI => TI.Category == tc.Category && TI.Id == tc.TestID).FirstOrDefault();
                if (ti != null)
                {
                    parameters.TestCases.Add(ti);
                    _currentTask.Add(tc);
                    testsExist = true;
                }
            }

            if (testsExist)
            {
                parameters.FeatureDefinition = FeatureDefinitionMode.Default;
            }
            else
            {
                parameters.FeatureDefinition = FeatureDefinitionMode.Define;
            }

            _currentTestIdx = 0;
            EnterNextTask();
            // setup DUT

            _td.Run(parameters);
        }