Exemple #1
0
        public void BeginRunTest(string filename, string[] testNames)
        {
            State = TestRunnerState.Running;

            var nameFilter = new SimpleNameFilter();

            foreach (var testName in testNames)
            {
                nameFilter.Add(testName);
            }

            CoreExtensions.Host.InitializeService();
            var testPackage = new TestPackage(filename);

            _testRunner.Load(testPackage);

            _testRunner.BeginRun(this, nameFilter);

            var stateCheckerThread = new Thread(() =>
            {
                while (_testRunner.Running)
                {
                    Thread.Sleep(100);
                }
                State = TestRunnerState.Idle;
            });

            stateCheckerThread.IsBackground = true;
            stateCheckerThread.Name         = "stateCheckerThread";
            stateCheckerThread.Start();
        }