Пример #1
0
 private void SaveLastRunFilter(IProgressMonitor progressMonitor)
 {
     using (progressMonitor.CreateSubProgressMonitor(5))
     {
         var filterSet = filterService.GenerateFilterSetFromSelectedTests();
         projectController.SaveFilterSet("LastRun", filterSet);
     }
 }
Пример #2
0
        private void RunTests(bool debug, ITestRunner testRunner, IProgressMonitor progressMonitor)
        {
            var testPackageCopy = testPackage.Copy();

            testPackageCopy.DebuggerSetup = debug ? new DebuggerSetup() : null;

            var testExplorationOptions = new TestExplorationOptions();

            var filterSet            = filterService.GenerateFilterSetFromSelectedTests();
            var testExecutionOptions = new TestExecutionOptions
            {
                FilterSet = filterSet
            };

            testRunner.Run(testPackageCopy, testExplorationOptions, testExecutionOptions,
                           progressMonitor.CreateSubProgressMonitor(85));
        }
Пример #3
0
        public void Execute(IProgressMonitor progressMonitor)
        {
            if (string.IsNullOrEmpty(FilterName))
            {
                throw new ArgumentException("Filter name cannot be null or empty");
            }

            using (progressMonitor.BeginTask("Saving filter", 2))
            {
                var filterSet = filterService.GenerateFilterSetFromSelectedTests();

                if (progressMonitor.IsCanceled)
                {
                    throw new OperationCanceledException();
                }

                using (progressMonitor.CreateSubProgressMonitor(50))
                    projectController.SaveFilterSet(FilterName, filterSet);
            }
        }